Gliding motility in Myxococcus xanthus is powered by flagella stator homologs that move in helical trajectories using proton motive force. The Frz chemosensory pathway regulates the cell polarity axis through MglA, a Ras family GTPase; however, little is known about how MglA establishes the polarity of gliding, because the gliding motors move simultaneously in opposite directions. Here we examined the localization and dynamics of MglA and gliding motors in high spatial and time resolution. We determined that MglA localizes not only at the cell poles, but also along the cell bodies, forming a decreasing concentration gradient toward the lagging cell pole. MglA directly interacts with the motor protein AglR, and the spatial distribution of AglR reversals is positively correlated with the MglA gradient. Thus, the motors moving toward lagging cell poles are less likely to reverse, generating stronger forward propulsion. MglB, the GTPase-activating protein of MglA, regulates motor reversal by maintaining the MglA gradient. Our results suggest a mechanism whereby bacteria use Ras family proteins to modulate cellular polarity.