Connect your audio source to the inputs of your compressor using shielded RCA type cables. If your compressor is configured in mono, only use the left output of your audio source.
Connect the left and right outputs of your compressor to the inputs of your noise gate, left side connections only for mono operation.
Adjust your compressor first to the desired setting, and then set the threshold of the noise gate just high enough so that the gate is closed only when there is no audio playing. This will ensure that the gate will open and close correctly and not cut off the beginning or end of any audio.