Gnats detest the pungent aromas of eucalyptus, peppermint, lavender, tea tree, basil, rosemary, vinegar, and lemon. These repellents can be diffused in essential oil diffusers or applied topically as a spray. Physical barriers, such as fly screens and sealed windows, keep gnats out. Environmental factors like dryness, low humidity, and the absence of standing water deter gnat infestations.