Bariatric surgery remains a potent therapy for nonalcoholic fatty liver disease (NAFLD), but its inherent risk and eligibility requirement limit its adoption. Therefore, understanding how bariatric surgery improves NAFLD is paramount to developing novel therapeutics. Here, we show that the microbiome changes induced by sleeve gastrectomy (SG) reduce glucose-dependent insulinotropic polypeptide (GIP) signaling and confer resistance against diet-induced obesity (DIO) and NAFLD. We examined a cohort of NALFD patients undergoing SG and evaluated their microbiome, serum metabolites, and GI hormones. We observed significant changes in Bacteroides, lipid-related metabolites, and reduction in GIP. To examine if the changes in the microbiome were causally related to NAFLD, we performed fecal microbial transplants in antibiotic-treated mice from patients before and after their surgery who had significant weight loss and improvement of their NAFLD. Mice transplanted with the microbiome of patients after bariatric surgery were more resistant to DIO and NAFLD development compared to mice transplanted with the microbiome of patients before surgery. This resistance to DIO and NAFLD was also associated with a reduction in GIP levels in mice with post-bariatric microbiome. We further show that the reduction in GIP was related to higher levels of Akkermansia and differing levels of indolepropionate, bacteria-derived tryptophan-related metabolite. Overall, this is one of the few studies showing that GIP signaling is altered by the gut microbiome, and it supports that the positive effect of bariatric surgery on NAFLD is in part due to microbiome changes