Bare in mind fungus gnats are predominantly a cause of your soil's environment...
Eggs take only a matter of days to hatch, the infestation more than likely happened after potting.
Also the adults lay where there's rich material and decay. If your roots are being eaten by gnats, there's likely a presence of rot.
I don't personally believe your plants roots are necessarily being eaten by the gnats. And if they are, the gnats are only a symptom of the problem, not the cause.
Don't get me wrong they are a pest, but much more of a nuisance than evil.
More than likely your plants are just a little overwatered. Rich soil, small plants, large pots, easy to do.