I've read about the microbiome being balanced by the immune system. The Th1 branch is responsible for dealing with bacteria, virii, and fungi. Getting that in good working order would be one way of fixing the gut issue.