Hairspray will kill them if you are dealing with just a few.
Mix a solution of 1 cup balsamic vinegar and 2 or 3 tbsp. of Dawn dish soap into a small cup or several small cups. The gnats will be attracted to it and climb in.
Or you could save jars and clean them out and pour vinegar into them and poke holes in the top of the jar.
Add your voice to the conversation. Click here to answer this question.