[header] How to use home remedies to get rid of gnats [title] Let infested soil dry out. [step] Allow the top 2 inches (5 cm) of soil to dry out completely before watering a gnat-ridden plant again. [substeps] Eggs are usually laid in damp, over-watered plants, and gnat larvae need to develop in moist organic material. 
Eggs and larvae will dry out and die if exposed to dry conditions. The infested plant may show early signs of withering, but this is unavoidable.