Having worked in the greenhouse for several years, I have received many requests for information regarding fungus gnats. They look like fruit flies and seem to be abundant in households during winter and early spring. Fungus gnats like moist soil to lay their eggs in. Upon hatching, the larvae feed on the roots of your plants. Healthy plants can typically withstand this but young seedlings may not.
Prevention of fungus gnats is easy. During winter months water your houseplants and seedlings less often. Allow the soil to dry before watering. A plant that required watering two or three times a week during summer may need watering only once weekly. Get to know your soil and your plant and you will be able to judge your watering requirement.
Should you already have a gnat infection, allow the soil to dry between waterings. You may wish to purchase fungus gnat traps from your local garden center and place them near where they are populated. These traps consist of yellow sticky papers and can be attached to branches or can be inserted into the soil medium depending on the type you purchase. You can make your own by using a yellow surface coated with Tanglefoot (a sticky substance available at your local nursery) or even Vaseline. Hang it close to where you see the greatest populations.
Fungus gnats seem to prefer soil mixes containing peat so if the problem is bad or recurring, consider changing your potting medium to one containing perlite and vermiculite and no peat. This alternative would be ideal for seedlings and sowing seeds.
Often fungus gnat eggs are present in the potting mixes and under the right conditions will hatch. Keeping the conditions unsuitable for gnats is the best prevention.