Since the discovery of extremely large non-saturating magnetoresistance (MR) in WTe2, much effort has been devoted to understanding the underlying mechanism, which is still under debate. Here, we explicitly identify the dominant physical origin of the large non-saturating MR through in-situ tuning of the magneto-transport properties in thin WTe2 film. With an electrostatic doping approach, we observed a non-monotonic gate dependence of the MR. The MR reaches a maximum (10600%) in thin WTe2 film at certain gate voltage where electron and hole concentrations are balanced, indicating that the charge compensation is the dominant mechanism of the observed large MR. Besides, we show that the temperature dependent magnetoresistance exhibits similar tendency with the carrier mobility when the charge compensation is retained, revealing that distinct scattering mechanisms may be at play for the temperature dependence of magneto-transport properties. Our work would be helpful for understanding mechanism of the large MR in other nonmagnetic materials and offers an avenue for achieving large MR in the non-magnetic materials with electron-hole pockets.