The time-varying characteristics of the gear system have an essential influence on its vibration and stability characteristics. Aiming at this characteristic and taking the generalized force caused by load torque as input and dynamic transmission error as output, a data-driven modeling method for gear time-varying system is studied using the periodic time-varying system identification theory. The effectiveness of the proposed method is verified by the lumped mass model of the gear system. This method has high modeling accuracy and can accurately characterize the time-varying characteristics of the gear system. Then, the virtual experimental platform of gear system dynamics is established based on the finite element theory. The method successfully extends to the virtual experimental platform, laying a foundation for analyzing the gear system’s dynamic characteristics.