Going through a little bout of this myself!.. I think I found patient zero, a Kosher Sorbet on the corner of tray 1. I noticed about 10 days ago a gnat flying round, and didn't think much of it. Fortunately, we have flood trays, and we have 7 gallon pots. I will feed until I see a good runoff on every one. So I may pump in 3.5 gallons, and get almost a gallon of runoff. As the runoff comes the end of the tray for extraction, I noticed a funny looking group of something floating on top of the water. I got the scope out, and FUCK!!!!, hundreds of baby larvae!.. SO, here's what I did. First, I put up 20 6x8 inch yellow sticky traps, and caught about 100 adults the first day. But before I hung the traps, I sprayed down the trays, and the topsoil with neem oil. I let each plant get to almost wilting before feeding them. I then sprayed neem oil on the top surface of the soil, flushed the piss out of them, and then sprayed another coat of neem oil on the top, wet surface of the soil. Over the past few days, I have just found dead larvae in the runoff, and Im not seeing any increase in the yellow traps, or anything flying around. So, .. I think I caught it early, and every plant has been flushed according to the water/feed log sheet, and it seems to be working for me.
EDIT: Im in week 3 of flower, but I never sprayed anything on the plant itself, just the soil and tray surfaces.