The original term was called autointoxication, where bacterial toxins formed in the gut were theoretically formed, they passed through the intestinal wall to interfere with the body, causing disease and malfunction.
I originally thought it originated from a nobel prize winning scientist Elie Metchnikoff, but he may have only advanced the theory. Now it's just called microbiome science and the concept of
fecal transplantation. The concept of intestinal permeability is the formal modernized concept of "leaky gut".
Another thing I recall is that bacterial endotoxins like
lipopolysaccharide are really good at disrupting tight junction proteins the make the gut more permeable, and some good bacteria make substances that enhance the gi barrier making it less permeable, like butyric acid. Needless to say the concept of rebuilding a damaged microbiome with a fecal transplant has firm scientific grounding. This is not a complete description by any means though, I encourage more reading.