Are they gnats or fruit flies? If they are fruit flies you are going to really have to keep after it.(I had an infestation in my kitchen once after a vacation) They lay eggs in your drains and will continue to hatch and lay more eggs. It is a tough battle to get rid of them. You have to keep everything clean. Get rid of stuff that might attract them. Bag up all fruit peelings and rinds, breads etc etc. Spray the crap out of your trash can. Don't put any soda cans or beer bottles or cans in your garage that haven't been rinsed etc etc. If you start to get a handle on it and let it slip, you will be right back at square one.
You can also leave bowls with a little red wine in them around. It will attract and catch the adult flies, but until you get all of them and there are no more eggs, they will come back.