Those are not gnats, unless you are being bitten to bits. Gnats are carnivorous.
They are probably fruit flies. Somewhere in your kitchen is a lingering rotten piece of vegetable matter. It probably looks OK to a casual glance, but pick it up and you will find it is rotting in the out of sight regions, like the bunch of bananas I bought last week that had gone black as Hades underneath ... yes, I've got them, too!
To get rid of them - leave something fruity lying around in an old food carton, to attract them. They will mate, lay eggs on the fruit, and die. Discard the fruit into the outdoor bin once a day. Spray it with flykiller if it makes you feel better.
They are quite fond of cider and sherry, too. Some species will choose to drown in that sort of liquid, which you can then pour away outdoors..