We demonstrate a mechanism for magnetoresistance oscillations in insulating states of two-dimensional (2D) materials arising from the interaction of the 2D layer and proximal graphite gates. We study a series of devices based on different two-dimensional systems, including mono- and bilayer Td-WTe2, angle-aligned MoTe2/WSe2 heterobilayers and Bernal-stacked bilayer graphene, which all share a similar graphite-gated geometry. We find that the resistivity of the 2D system generically shows quantum oscillations as a function of magnetic field corresponding to a high-density Fermi surface when they are tuned near an insulating state, in contravention of naive band theory. Simultaneous measurement of the resistivity of the graphite gates show that these oscillations are precisely correlated with quantum oscillations in the resistivity of the graphite gates themselves. Further supporting this connection, the oscillations are quenched when the graphite gate is replaced by TaSe2, a high-density metal that does not show quantum oscillations. The observed phenomenon arises from the oscillatory behavior of graphite density of states, which modulates the device capacitance and, as a consequence, the carrier density in the sample layer even when a constant electrochemical potential is maintained between the sample and the gate electrode. Oscillations are most pronounced near insulating states where the resistivity is strongly density dependent. Our study suggests a unified mechanism for quantum oscillations in graphite-gated 2D insulators based on sample-gate coupling.