What you will need:
1 small jar or bowl
1/3 cup apple cider vinegar
2 tbs water
1 drop of mild liquid dish washing detergent such as Dawn.
Pour apple cider vinegar into the jar/bowl. Add water then add just one drop of mild liquid dish detergent. Set the mixture in the area where gnats are a problem. The gnats are naturally attracted to the vinegar and the drop of soap kills them.