I am very sorry if advertising hype, CSI or tech support gave you the wrong impression. No software can change a noisy mic into a non-noisy one. You can lessen the effect and if you are lucky enough to have the hum be isolated to a single frequency, perhaps filter out the noise, but you will never create a signal as clean as if you had started with a clean signal to begin with. Using a USB mic with a program as powerful as Sonar is treading into oxymoron territory. Would you buy an expensive new home and put plywood doors on it? Would you buy a BMW and put a $25 generic stereo in it? I doubt it. Many USB mics come with entry level software because the primary use of such mics is podcasts and musicians who use such recordings as a scratchpad to be re-recorded later. I understand that you may not have the budget at the moment to replace the mic, but if you can, it is a good idea. You have too much money invested in Sonar to ruin your recordings at the source. Sonar is great but no DAW can take a bad signal and make it pristine.
With that said, I concur with others that said that EQ or some other form of filtering is likely a better solution than gate if it's a hum. The defining control on a gate is threshold and odds are good that the threshold of the hum is going to overlap some of the signal you actually want. I would do a classic eq notch sweep first (short explanation, make a narrow notch in the quadcurve EQ and turn gain way up so that any changes are noticable and then go up and down frequencies until you isolate the hum) and then reduce as much of that frequency and harmonics before any attempt at gating.
Another option is to try noise reduction plugins. Try the free one on audacity first. There are expensive noise reduction plugins like rx3 that will do a great job but it seems insane to me to actually plan to use noise reduction on every recording in advance when you can fix the problem at the source.