King oyster mycelium eats gnats for breakfast. It can form sense-activated traps and lures the gnats into them. I'm not sure if it's king oyster, or another oyster species/strain, but I remember it being some kind of predatory oyster fungus.
That's one way to go at them.
I saw a giant decrease in amount of gnats when I started watering from the bottom instead of the top. There's a few reasons for this: the bottom has spiders and other dwelling insects, and it's hard to reach a hole for a flying insect, it's also a fact that the top-layer (most favored by gnats) stays dry if you bottom-water. Making it useless to lay eggs in. This bottom-watering reduces the 'egg laying area' from 400cm² to around 15cm² in a single pot.
Gnats are nasty buggers, I've been dealing with them for a few years every now and then. They only show up when I really over-water substrates. I tested it, and I had to nearly drown my plants for them to show up in my house. So prevention is a good start; never let the soil go wet, unless you're growing in a bog. With most plants, that's not the case.
I deal with them by drying out the soil completely. Most plants survive a day in the shade with dried soil. Then I rehydrate the soil using dishwashing soap (to break surface tension) and emulsified (by the soap) neem oil. The plants revive pretty fast, within hours. I wait another day before putting them back in the sun.
Diamotaceous earth only works in dry form and it's only for insects that have tracheoles. Most gnats don't have that until they're adults if I remember correctly.
If you're really wanting to catch them and throw them out, being super-duper over the top organic.. There's always fruit pulp; gnats love it more than chewing on roots and fungi, place your pots on top of some fruit pulp, and they'll migrate there. Just scoop the pulp before it starts catching yeasts and starts fermenting. However, this method attracts even more gnats in the long run. That's the thing with going organic: if you don't accept pests as part of the deal, there's really no way to get rid of them without attracting more. Or you'll have to take preventive measures.
Going dry is the best way for me. The little gnat worms just crumble up in a day.
Sterilizing soil is just outrageous; you kill absolutely everything that's in there, everything that could protect your plant from seedling to adult. You'll have to add at least 3000 types of bacteria and over 40 types of fungi yourself after sterilizing. I remember a story about the Germans after world war II trying to replant a forest in sterile soil. Maybe around 40 out of the 150.000 planted trees did manage to stay alive long enough for the people to find out sterile was not the way to go with plants.
I hope this helps anyone in the future!
Good luck.