They can be Fungus Gnats or White Flies.
Either way they lay eggs in the soil and when the eggs hatch & mature they start to fly around.
Fly strips are a good idea to catch the flyers. Also you can put a layer of sand on top of the soil 1 to 2 inches thick. This will trap the larvae as they mature so they can't fly away, they'll just starve. And the sand stops them from getting to the soil to lay more eggs.
Also, the sand will stop gouging when you water.
Good luck with the flies/gnats.