By ear.
Basically you're setting the gate to a level so it opens for the drum you want to hear but remains closed for the general wash from other drums. It can be a bit of a balancing act but what you're trying to avoid is the gate failing to open at the right time for the desired drum--and you can only judge that by listening.
(Of course, you'll eventually experiment with setting you gate NOT to open at the beginning of a hit, thus creating a very clipped, definite sound. SOMETIMES this can be a neat effect but it's also prone to overuse.)
Depending on the gate you have, you may also be able to adjust attack and release--basically how quickly the gate opens for a specific level and how long it takes to shut when the level drops below the threshold. Again, adjust by ear but I'd suggest starting with a quick attack and slower release.