guide
How to gate drums without killing them
Set the threshold in the window between the loudest bleed you want out and the quietest hit you want in. Keep the attack fast - 0.1 to 1 ms - so the transient survives, use hold to cover the body of the hit, and set release long enough that the tail decays rather than being chopped.
The threshold is a window, not a level
Before touching anything, find the two levels that matter: the loudest bleed on the track and the quietest hit you want to keep. On a snare mic that is the loudest hi-hat spill and the softest ghost note.
Your threshold goes between them. If there is no gap - if the quietest ghost note is quieter than the loudest hat - then no threshold setting will separate them and a gate is the wrong tool. Either accept the bleed, or use the side-chain filter below to widen the gap artificially.
This is why gating is easy on a kick, awkward on a snare and usually a bad idea on overheads, where the bleed is the recording.

Attack: faster than you think
A drum transient is over in a couple of milliseconds. An attack of 10 ms does not 'soften' it, it removes it - the gate opens after the stick hit has already happened and you hear the body of the drum with the crack missing.
0.1 to 1 ms for anything percussive. The only reason to go slower is deliberate effect, and if you want that, a transient shaper does it better.

Hold does the job people ask release to do
Chatter is the usual problem: the gate opens on the hit, the level dips momentarily, it closes, the level comes back and it opens again, a few times per hit. It sounds like stuttering.
The instinct is to lengthen the release. That works, and it also means every hit has a long lazy fade that lets the bleed back in underneath. Hold is the right control: it forces the gate to stay fully open for a set time after the threshold is crossed, regardless of what the level does in the meantime. Set it to cover the body of the hit - 20 to 80 ms on a snare - and the chatter stops without the release getting sloppy.
Hysteresis does the same job from the other side: it closes the gate at a lower level than the one that opened it, so a small dip cannot re-trigger the decision.
Release: listen to the tail, not the meter
Release sets how the gate closes. Too short and you chop the drum's own decay, which is instantly audible as an unnatural stop - especially on a snare with any ring to it. Too long and the gate is still open when the next bar of bleed arrives.
50 to 200 ms covers most snares and toms. Set it by soloing the track and lengthening until the decay sounds like a drum rather than an edit, then shortening slightly until the bleed between hits goes away.
Key the gate off the right thing
A gate's detector does not have to listen to the full-range signal. Filtering the side-chain - so the detector hears only 150-400 Hz on a snare, say - makes the decision on the part of the signal where the drum dominates the bleed, rather than the part where the hi-hat does.
This is the trick that rescues tracks with no usable threshold window. The hat may be as loud as a ghost note overall, but it is far quieter than that ghost note at 200 Hz, so a filtered detector can tell them apart when a full-range one cannot.

If reading the track and placing thresholds by hand is the part you would rather skip, Zuul Gate measures the track and sets them; TK Gate reduces the whole thing to depth and punch.
Common questions
What is the difference between a gate and an expander?
A gate is effectively an expander with an infinite ratio: below the threshold the signal is silenced. An expander reduces the level below the threshold by a set ratio instead, so quiet material gets quieter rather than disappearing - which is usually gentler and less obvious on drums with bleed.
Should I gate toms?
Often yes - tom mics are open for most of a song and pick up everything around them. Toms also have long decays, so use a generous hold and release, and check the gate is not clipping the tail of the last fill before a quiet section.
Why does my gate chatter?
The level is crossing back and forth over the threshold during a single hit. Use hold to force the gate to stay open for a set time after it opens, or hysteresis so it closes at a lower level than it opens at. Lengthening the release masks it but lets more bleed through.
Can you gate a whole drum bus?
Not usefully. Everything arrives at once, so there is no bleed to separate from the hits - the gate can only turn the entire kit on and off. Gate the individual close mics, where there is actually a decision to make.
Tools for this

Zuul Gate
£29Gates set in seconds - it reads the track and places the thresholds for you. Then adds punch on the way out.
View plugin →
TK Gate
£19Depth walks from genuinely inert to a hard gate. The detector adapts between peak and RMS on its own, so one setting works on a snare and on a sustained guitar. Punch puts the crack back.
View plugin →