Gut microbiota perform various functions including metabolic, structural, and protective roles. They assist in breaking down polysaccharides, proteins, and polyphenols, while also synthesizing essential vitamins like B and K, and producing short-chain fatty acids. Additionally, gut bacteria help in the biotransformation of bile acids, reducing their toxicity through deconjugation.