Stimulated emission depletion (STED) microscopy is a prominent approach of super-resolution optical microscopy, which allows cellular imaging with so far unprecedented unlimited spatial resolution. The introduction of time-gated detection in STED microscopy significantly reduces the (instantaneous) intensity required to obtain sub-diffraction spatial resolution. If the time-gating is combined with a STED beam operating in continuous wave (CW), a cheap and low labour demand implementation is obtained, the so called gated CW-STED microscope. However, time-gating also reduces the fluorescence signal which forms the image. Thereby, background sources such as fluorescence emission excited by the STED laser (anti-Stokes fluorescence) can reduce the effective resolution of the system. We propose a straightforward method for subtraction of anti-Stokes background. The method hinges on the uncorrelated nature of the anti-Stokes emission background with respect to the wanted fluorescence signal. The specific importance of the method towards the combination of two-photon-excitation with gated CW-STED microscopy is demonstrated.