What kind of gnats are these?
If it is those fruit bugs, just spray the soil with a mixture of water with a little soap detergent. That works. Also, try to water less.
If you want, remove the plant from it's pot, use fresh soil and rinse the root ball.