Advancing and receding angles are physical quantities frequently measured to characterize the wetting properties of a rough surface. Thermodynamically, the advancing and receding angles are often interpreted as the maximum and minimum contact angles that can be formed by a droplet without losing its stability. Despite intensive research on wetting of rough surfaces, the gravitational effect on these angles has been overlooked because most studies have considered droplets smaller than the capillary length. In this study, however, by combining theoretical and numerical modeling, we show that the shape of a droplet smaller than the capillary length can be substantially modified by gravity under advancing and receding conditions. First, based on the Laplace pressure equation, we predict the shape of a two-dimensional Cassie-Baxter droplet on a textured surface with gravity at each pinning point. Then, the stability of the droplet is tested by examining the interference between the liquid surface and neighboring pillars and analyzing the free energy change upon depinning. Interestingly, it turns out that the apparent contact angles under advancing and receding conditions are not affected by gravity, while the overall shape of a droplet and the position of the pinning point are affected by gravity. In addition, the advancing and receding of the droplet with continuously increasing or decreasing volume are analyzed, and it is shown that the gravitational effect plays a key role in the movement of the droplet tip. Also, the gravitational effect on the degree of the stability of the droplet upon the external effect such as vibration is discussed. Finally, the theoretical predictions were validated against line tension-based front tracking modeling (LTM) that seamlessly captures the attachment and detachment between the liquid surface and the solid substrate. Our findings provide a deeper understanding on the advancing and receding phenomena of a droplet and essential insight into designing devices that utilize the wettability of rough surfaces.