After fighting an epic battle with the gnats in my house, and finally winning after trying everything in the book, I have discovered the key to stopping them is to cover the soil with sand (or alternatively a very chunky medium like bark) and make sure there is no standing water under the pots after you water. You have to leave them with zero places to lay eggs. I thought just the sand had done the trick, but found out after I lifted a plant to move it that larvae and gnats were living off the dirty water pooled in the grooves of the tray underneath.
Gnat nix looks like a sand-like soil topping that will achieve the same effect as sand, based on the reviews, but save your money and just use sand.
Insecticides can work very well for house plants, but gnats will always come back if you don't address the root causes, plus I would never subject an edible plant to that. Sticky traps, neem oil, vinegar, and remedies like that will only reduce numbers.
Good luck with your fight!