I got 'em once from a shitty bag of soil I bought.
Myself, all I did to get rid of them was I hung a Hot Shots strip, and let my soil dry out really well.
Viola, no more gnats, period.
(they also killed my spiders though, and that sucked.)
The plants drooped a little bit because they got...