+1 for diatomaceous earth.. works wonders! looks flour or baking soda, safe for plants, and totally safe for human ingestion as well
these gnats live/hatch in the soil... i just cover up the top of soil with a layer after watering.. repeat once or twice.. after a day or two.. they are gone...