A gnat is any of many species of tiny flying insects in the dipterid suborder Nematocera, especially those in the families Mycetophilidae, Anisopodidae and Sciaridae. Most often they fly in large numbers, called clouds. "Gnat" is a loose descriptive category rather than a phylogenetic or other technical term, so there is no scientific consensus on what constitutes a gnat. Some entomologists consider only non-biting flies to be gnats. Certain universities and institutes also distinguish eye gnats: the Smithsonian Institution describes them as "non-biting flies, no bigger than a few grains of salt, ... attracted to fluids secreted by your eyes".
Gnat from Robert Hooke's Micrographia, 1665
A female black fungus gnat
The Nematocera are a suborder of elongated flies with thin, segmented antennae and mostly aquatic larvae. This group is paraphyletic and contains all flies but species from suborder Brachycera, which includes more commonly known species such as the housefly or the common fruit fly. The equivalent clade to Nematocera is the whole Diptera, with Brachycera as a subclade. Families in Nematocera include mosquitoes, crane flies, gnats, black flies, and multiple families commonly known as midges. The Nematocera typically have fairly long, fine, finely-jointed antennae. In many species, such as most mosquitoes, the female antennae are more or less threadlike, but the males have spectacularly plumose antennae.
Nematocera