A resonator integrated optic gyro (RIOG) employing trapezoidal phase modulation (TZPM) technique is proposed, analyzed, and demonstrated for the first time. This technique can provide more information about the whole gyro system without complicating the light circuit structure, making it possible to compensate the gyro output in real time. The experimental results of the RIOG prototype show that the standard deviation is greatly reduced after compensation, which proves the viability and effectiveness of the TZPM technique. A bias stability of 0.09 deg/s with an integration time of 10 s over 3000 s is achieved, which is, to our knowledge, the best long-term performance that ever been reported in a RIOG based on a silica waveguide ring resonator.