Cyclic loading of fluid-bearing soils often induces excess pore water pressure, leading to accumulation of strain in the solid matrix. Additionally, variations in material density and volumetric fraction due to gravitational effects generate momentum forces, which subsequently cause deformation in the soil. In this paper, we present a mathematical framework of poroelasticity that generalizes the simultaneous action of gravitational body forces and cyclic loading to analyze solid deformation and fluid pressure dissipation in partially-saturated porous media. To account for the effect of gravity, the gradient of the vertical displacement needs to be treated as an additional dependent variable alongside pore air and water pressures.We numerically solve a mixed strain-controlled and pressure-prescribed boundary-value problem using a finite difference scheme as a representative example to quantify the impact of gravitational forces. Our results show that gravitational compaction affects both total settlement and excess pore water pressure, with its influence being particularly significant at lower water saturations, regardless of excitation frequency, soil depth, or type. The effect of gravity is more pronounced in soils with higher compressibility but appears insensitive to excitation frequency. Notably, the gravitational effect correlates linearly with the depth of the soil deposit and, therefore, should be well integrated into the consolidation theory of poroelasticity.