Depending on species, gnats can be biting or nonbiting and will feed on plants, other insects or blood. Females of some species, such as the black gnat or black fly, feed on blood. read more
But they are adult. I am quite sure that gnats and flies (the common ones people usually refer to) are separate species. The common fly, as a baby is a larvae, or one would call them maggots. read more