The larvae that it lays eats your roots eventually killing your plant so i would consider them very harmful.
At the very least there destroying the root system.
that is not completely true, i have done complete grows with them present, and got excellent harvests
the degree that they get out of hand seems to vary a bit, but they do eat roots, so they're not good
they annoyed me enough to see how to get rid of them properly
and that was soil pasteurization, bake soil at 180 degrees for an hour or so, no more gnats
beneficial bacteria can survive these conditions, most insects can not
a widely used practice in commercial greenhouses, but sadly does not help OP in current situation