Answer: It sounds like you have an infestation of fungus gnats and you can stop them by interrupting their breeding cycle. They reproduce in the top layer of damp potting soil, so covering the soil with a thin layer of a fast-drying material such as coarse sand or fine gravel, combined with allowing the soil surface to dry out a bit between waterings, should take care of the problem in a week or two.
Since you won't want your seeds to dry out while you are waiting for them to germinate, you might try enclosing the containers in plastic wrap until the seeds begin to germinate. The plastic will maintain the humidity needed for the seeds (but will exclude the gnats) and in my experience is a very good way to start seeds in any case.
Q&A Library Searching Tips