What is your growing method, soil?
There are a number of threads in the Organics with good info if you try the search. I recommend sticky traps, vacuuming adults and biological controls.
Mosquito Dunks\Bacillus thuringiensis israeli of which there are liquid formulations more commonly available such as Gnatrol and others. But Mosquito Dunks or Mosquito Bits will work, it is the some thing, they just need to be soaked in water for 12-24 hours and then you use that water to irrigate the plants and do that every 5-7 days. Keep doing it every other week at least even if you think they are going away. This is a bacterium which produces a toxin that kills fungus gnat larvae, and a few other species of insect larvae but it is quite harmless to most other organisms including humans and plants.
Nematodes and predator mites also predate on gnat eggs and larvae and these are good for soil.