Are they fast moviong black gnats? If they are moving reallyi fast they could be root aphids.. and thats a hell of a task to get rid of them.. mosquito dunks don't do shit.. If they have a wide body and seem to be moving fast , than you probably have winged root aphids.
D.E. works great
If they are strong flyers and like someone else said, have a wide body, you might have root aphids, which can be a nightmare. Buy some yellow sticky traps to help identify which bugs you have. If they are knats, all the methods mentioned are great, but if you have aphids that's a different story. I have had them in the past and it's very hard to destroy all of them but I found a few products that worked very well. SNS 203 works great as a soil drench and kills them directly or botaniguard is probably the best but most expensive.
Sometimes poisons are all that will wipe out mites or aphids. especially fast and with a large crop
You do know all the fruit and vegetables you eat have been sprayed regularly with poisons
often up to a few days before there picked.
just dont spray them to close to harvest and read the label.
If they are just fungus gnats (more than likely) and you haven't noticed any damage to your plants don't fret about it. They are called fungus gnats because their main food source is fungus which will more than likely be plenty of inside of your soil . If you see damage to your plants, that is when you have to start questioning whether they are nefarious are not.