To get rid of gnats, set out a saucer or small bowl of vinegar. Gnats will be drawn to it and will drown themselves in the vinegar.