The ponderomotive force is derived for a relativistic charged particle entering an electromagnetic standing wave with a general three-dimensional field distribution and a nonrelativistic intensity, using a perturbation expansion method. It is shown that the well-known ponderomotive gradient force expression does not hold for this situation. The modified expression is still of simple gradient form, but contains additional polarization-dependent terms. These terms arise because the relativistic translational velocity induces a quiver motion in the direction of the magnetic force, which is the direction of large field gradients. Oscillation of the Lorentz factor effectively doubles this magnetic contribution. The derived ponderomotive force generalizes the polarization-dependent electron motion in a standing wave obtained earlier [A. E. Kaplan and A. L. Pokrovsky, Phys. Rev. Lett. 95, p. 053601, 2005]. Comparison with simulations in the case of a realistic, non-idealized, three-dimensional field configuration confirms the general validity of the analytical results.