Fungus gnats in and of themselves aren't particularly harmful to plants, but can act as a vector for disease.
Hang a no-pest strip, and make sure that your grow room has nowhere for standing water to sit and stagnate- that's where the nasty little shits hang out and do their bug thing.
Pyrethrin bomb the room if you want faster and better results, and repeat once about 3 days after the first bomb, to kill any flies that emerged from a more protected life stage, such as eggs, and missed the first round.