The effect of surface friction on the dynamic response of spur gear pair is investigated in this paper. Firstly, surface friction during the mesh is described briefly, and realistic time-varying tooth stiffness and realistic static transmission error are introduced. Subsequently, the differential equation of the torsional vibration of gear transmission is developed in which the realistic time-varying stiffness and realistic static transmission error are incorporated. Finally, using the numerical simulation method, the solutions in time domain and spectrum graphs of the nonlinear system are obtained. Results show that surface friction has great influences on the dynamic responses nearby the pitch point but less influences far away the pitch point. Surface friction may also bring sudden change to the dynamic responses at pitch point when the rotational speed is low.