Guillot et al. 2010 give a comparatively simple solution (their Eqn. 27) for a double-gray purely radiative atmosphere. It reproduces the equilibrium temperature in the optically thin limit.
Robinson & Catling 2012 extended the previous calculations to include convection. The expression for the temperature profile as function of optical depth can however not be written down explicitely anymore in that case, it has to be iterated on.
Those are merely solutions that have become popular in recent years in the exoplanet community. Less well known is that Schwarzschild 1906, Milne 1921 and Sagan 1969 already contributed solutions of the form of
$$ T^4(\tau) = T^4_{eq}\left(\frac{1}{2}+\frac{3}{4}\tau \right) $$
where $\tau$ is the optical depth of the atmospheric gas, taken as vertical coordinate and the unity factors in the brackets (particularly the 3/4 in front of $\tau$) will depend on many details of the derivation, especially boundary conditions and various assumptions about geometry and radiation transport. The variable $\tau$ increases as we go deeper into the atmosphere.
Note that this solution predicts $T=T_{eq}$ only at an optical depth of $2/3$, i.e. for moderately massive atmospheres. At lower optical depth, the atmospheric temperature will be $T<T_{eq}$, even if there is a surface at $T=T_{eq}$.
To get a surface temperature, you have to know the infrared optical depth of the surface though $\tau_0$, which you have to obtain from the complicated and pressure-dependent opacity functions of the entire gas mixture in question. Then you can evaluate $T^4(\tau_0)$ for an estimate of the surface (gas) temperature.
For Earth, with $\tau_{IR}\approx2$ and $T_{eq, E}=255K$, this would yield $T_{surf,E}=303K$ (an ok estimate, considering that the purely radiative model ignores convection), and for Venus with $\tau_{IR}\approx 100$ (taken from the Sagan paper), and $T_{eq,V}=226K$ one would get $T_{surf,V}=666K$ (clearly farther off, but still shows the point that the surface is much hotter than the equilibrium temperature).