I agree with grey; pyrethrins are a pretty simple and foolproof way to deal with infestations.
Keep the gnats from returning by taking away their nice wet homes- standing water in drip trays, muck under pots- they love that. So keep your grow area nice and dry, and they won't be interested in residing there any more.