Progression of chronic liver diseases is precipitated by hepatocyte loss, inflammation and fibrosis. This process results in the loss of critical hepatic functions, increasing morbidity and the risk of infection. Medical interventions that treat complications of hepatic failure, including antibiotic administration for systemic infections, impact gut microbiome composition and metabolite production. Using a multi-omics approach on 850 fecal samples from 263 patients with acute or chronic liver disease, we demonstrate that patients hospitalized for liver disease have reduced microbiome diversity and a paucity of bioactive metabolites. We find that patients treated with the orally administered but non-absorbable disaccharide lactulose have increased densities of intestinal Bifidobacteria and reduced incidence of systemic infections and mortality. Bifidobacteria metabolize lactulose, produce high concentrations of acetate and acidify the gut lumen, which, in combination, can reduce the growth of antibiotic-resistant pathobionts such as Vancomycin-resistant Enterococcus faecium. Our studies suggest that lactulose and Bifidobacteria serve as a synbiotic to reduce rates of infection in patients with severe liver disease.