We consider a dilute gas of inelastic hard spheres enclosed in a slab under the action of gravity along the longitudinal direction. In addition, the gas is subject to a white-noise stochastic force that mimics the effect of external vibrations customarily used in experiments to compensate for the collisional cooling. The system is described by means of a kinetic model of the inelastic Boltzmann equation and its steady-state solution is derived through second order in gravity. This solution differs from the Navier-Stokes description in that the hydrostatic pressure is not uniform, normal stress differences are present, a component of the heat flux normal to the thermal gradient exists, and the temperature profile includes a positive quadratic term. As in the elastic case, this new term is responsible for a bimodal shape of the temperature profile. The results show that, except for high inelasticities, the effect of inelasticity on the profiles is to slightly decrease the quantitative deviations from the Navier-Stokes results.