Do you have any house plants? If so, what kind of soil did you use? House plants need to have sterilized house plant soil. Outdoor soil can have gnat eggs which means gnats in your house.
To get rid of gnats Naturally, use Dr. Bonners Magic Soap (Peppermint scent)
This also doubles as safer soap, even kills fungus gnats. Wash the area down with a strong solution, it will leave a slight peppermint scent but peppermint is a good repellant for many insects, it kills on contact when sprayed. I always have a bottle here for garden use. Even repels spiders.
I hope this helps you, it's all natural.
What I have noticed with gnats, anything that has moisture, like wet paper towels in the trash bin that doesn't dry up, and with used kitty litter just sitting there gets gnats. So, when I use paper towels I let them dry before throwing them away. When I have food that I don't eat I'll use a plastic bag to put the food in and take it to the trash bin. Never do I put it the trash bin inside especially during the summer. During the winter I don't have any gnats, but when it gets warmer it seems this is when gnats start showing up.
I meant to report back on this a while back, but I forgot about it after I got rid of the problem.
I found the ultimate gnat zapper. You guys offered some good solutions, but they have to be re-done, renewed, refreshed, and every time I go out to bring in the mail, more gnats follow me back in.
As Jimi pointed out (as do many online sources) gnats hate peppermint. I've never vaped mint flavors, never did smoke menthol, none of that, but for gnat patrol I ordered a bottle of peppermint eliquid at my usual nic and pg/vg levels. I have a dedicated tank for it, which I keep at my desk, and when a new gnat starts dive bombing me, I switch tanks from my clove to this peppermint, and done. Gnat executed, can't escape the cloud.
I hope this will help someone else.