In a stimulated emission depletion (STED) microscope the region in which fluorescence markers can emit spontaneously shrinks with continued STED beam action after a singular excitation event. This fact has been recently used to substantially improve the effective spatial resolution in STED nanoscopy using time-gated detection, pulsed excitation and continuous wave (CW) STED beams. We present a theoretical framework and experimental data that characterize the time evolution of the effective point-spread-function of a STED microscope and illustrate the physical basis, the benefits, and the limitations of time-gated detection both for CW and pulsed STED lasers. While gating hardly improves the effective resolution in the all-pulsed modality, in the CW-STED modality gating strongly suppresses low spatial frequencies in the image. Gated CW-STED nanoscopy is in essence limited (only) by the reduction of the signal that is associated with gating. Time-gated detection also reduces/suppresses the influence of local variations of the fluorescence lifetime on STED microscopy resolution.