The short answer is “after the point where there’s noise.” But it’s often more complicated, because noise can occur at many points in a signal chain. That’s why some noise gates, such as the BOSS NS-2 Noise Suppressor for guitars, includes both a main input/output section to plug into an amp and an insert for connecting your noisy effects into a separate loop for reduction at multiple points in your signal chain.
In general, if you’re not sure where to best position your noise gate, listen to your signal at different points in the chain; to just the pickups on your guitar through a clean amp, then to your amp with no effects, then with one effect at a time, and so on, to determine where the noise is worst. Placing a noise gate after that point is a good bet. And if you find that there’s so much noise that you’re clamping down to the point that it degrades your signal, try using multiple noise gates on mild settings at several points in the chain to tamp down the noise, before it is amplified by other processors and circuits.
As a bonus tip, it’s generally best to place any noise reduction processing before delay or reverb effects, as the noise reduction will have a tendency to clamp down on reverb tails and softer echo effects.