I have had that annoying gnat problem too. It drives me nuts. It mostly happens with the seed starting mix I open in the spring, leave outside through the summer and bring in. I can't think that I have directly opened a mix and had these gnats.
Sad that you lost a bunch of seedling starts. You should get some more going...there's still time you know
And I know you do good work....