Contact fatigue is the primary failure form in the closed and well lubricated gear driving. Residual stress is an important factor influenced the fatigue. In this paper a relationship between the compressive residual stress and the gear contact fatigue strength was established basis on static shakedown analysis with elastic-plastic contact theory. The contact stress was obtained by hertz theory, and the residual stress induced by the gear meshing was simulated though finite element method. Base on the residual stress distribution obtained in previous step, three different pressures according to James theory was loaded into the contact zone. It was shown that the gear plastic deformation was unchanged if the secondary loading was no more than the initial load. The results suggest that residual compressive stress could improve the contact fatigue strength.