Yes, bacteria do influence hormones and vice-versa, they cause changes in the pH and the environment thereby leading to influence on endocrine as well as non-endocrinological factors.
see a quote about it:-
http://www.fhcrc.org/about/pubs/center_news/2005/oct20/sart2.html
"Some scientists have suspected that intestinal bacteria influence bone density because these bacteria metabolize sex hormones like estrogen, and sex hormones are known to influence bone growth and function. Different people have different types of bacteria living in the gut, which means that their bodies may metabolize sex hormones differently and thus have different effects on bone density."