How can I get rid of the gnats flying around my house plants?
Those tiny black gnats are fungus gnats. They lay their eggs in the soil. The eggs turn into tiny wormlike larvae that munch on soil fungi and rotting plant roots. They don't chew enough roots to damage the plant unless the infestation is excessive or the plant is small, such as a seedling. The larvae pupate, then emerge from the soil as flying gnats. Fungus gnats may be a clue that you're overwatering your plants. They can show up in soils of well-managed plants, too, but they're more common when the soil is kept constantly moist. Allow the soil to dry more between waterings.
You can also control fungus gnats using a type of bacteria, Bacillus thuringiensis israelensis (Bt). It comes in a liquid form that you mix with water, then pour onto the soil of your plants. It's important to follow the label directions carefully and make follow-up applications on schedule to break the gnats' life cycle. It's not enough to control the adults; you want to wipe out the juvenile forms too.
You can instantly eliminate a multitude of the hovering adults by inserting yellow or blue sticky cards into a few of your houseplants. These cards are coated with glue that ensnares the insects, which find the yellow and blue hues irresistible. One word of warning on bacterial control methods: The Bt solution, often sold under the name Knock-Out Gnats or Gnatrol, smells horrible. You'll never want to take a whiff from the bottle! You can keep any unused solution in a sealed plastic bottle until your next watering. Just avert your nose when you remove the lid.