to effectively control gnats, you need to treat at least two, if not all, of the three stages of life.
no pest strips for flying insects are awesome for adults. you can get em at most nurseries or garden supply shops, and quite a few hardware stores carry them too. they dont have to say they're for gnats, as long as theyre sticky it werks. place em sticky side up over the soil and adults will land on it. very satisfying method, as you get to watch the progress. I hung one from a light fixture as well. it nabbed a few, but not as many as the one near the soil.
eggs, larvae, and juvies hang in the soil. larvae feed on the roots of your babies. you can use this to your advantage by adding a more seductive root to the top of your soil. a wedge of raw potato pressed into the top of the soil attracts them, and so u can rotate new pieces in every day or two.
I have had absolutely wonderful success with this two step process. eggs hatch, larvae chase potato. the juvies grow and learn to fly, and land in the sticky traps. This took about a week to clear up. 10 days and there were no more gnats at all. haven't seen one since. I did try to speed up this process by agitating the soil, and moving adults out of hiding places (like underneath the pots). I actually watched em take off in fright, only to immediately land in glue
You can use a pyrethrin based insecticide as well. I regularly treat my houseplants with a "Safer" soap spray containing this pesticide, but i only go organic on anything consumable.