Can a gut infection cause low testosterone and brain fog?

Sometimes, but the link has to be shown rather than assumed. What post-infectious illness actually explains, and what one low testosterone reading does not.
Are gut microbiome tests accurate?

It depends which kind. Seven direct-to-consumer services tested one stool sample and disagreed as much as different donors do. Clinician-ordered panels differ.