PineSol, Bounce Fabric Softener sheets, ammonia... even moth balls.
Of course you are going to smell strong too.
Cigarette smoke keeps them away too. If you can stand the smell you can burn cigarettes around the perimeter of the site.
Same thing a centronella candle does.
Shade and wind are things gnats don't like.
Gnats love fruit so if you use a cologne or soap that has a strong odor they are attracted to it.
They also love coffee. Put your coffee grounds off to the side of your campsite and they will hang out there.
Google is your friend.