The gate is often thought of as a companion to a compressor.
Compression always has the effect of increasing the noise level. This is because the peaks of the signal are brought down in level, bringing them closer to the noise floor. Then make-up gain is applied to bring the overall signal level back up again, raising the noise floor at the same time.
Even if there were such a thing as a perfect compressor, this would still happen.
The obvious answer is to use a noise gate to remove the noise, providing the signal meets the criteria for gating as outlined above.
There are two schools of thought among engineers as to how the two should be connected:
Great home recording starts with a great home recording studio. It doesn't need to be expensive if you know how to select the right equipment for your needs.