Gnats are attracted to fruit going bad, garbage bins that need to be emptied or other such refuse. They are also attracted to warm moist places such as your house plants. Since they reproduce quite quickly it is important that you act fast.
Fortunately for you, these little pests are attracted to vinegar.
Your first step is to eliminate the cause of the problem. Remove rotten fruit, empty trash bin, wash dirty dishes etc.
The second step is to provide an alternate attraction point for them.
Take your bottle of vinegar and fill one or more small containers. Cap the containers securely and poke some small holes so they can get in but will have problems exiting. If you have multiple problem areas repeat the process until each spot has its own trap. Once all the pests are captured simply throw them out with the trash.
Bowls can also be used if you add some dish soap to create a sticky mixture. The vinegar will attract them and the soap will hold them.
House plants can be misted with vinegar and then the leaves wiped with paper towel to remove the little pests when they land
I have also seen them hovering around the sink drain.
Their mistake!
Pour a little vinegar into the drain and when they go for the bait just turn on your tap.