Abstract Objective Metabolic and bariatric surgery (MBS) is associated with substantial, but variable, weight outcomes. The gut microbiome may be a factor in determining weight trajectory, but examination has been limited by a lack of longitudinal studies with robust microbiome sequencing. This study aimed to describe changes in the microbiome and associations with weight outcomes more than 2 years post surgery. Methods Data were collected at two Midwestern U.S. centers. Adults undergoing primary MBS were assessed before and 1, 6, 12, 18, and 24 months after surgery. BMI and metagenomic sequencing occurred at each assessment. A linear growth mixture model determined class structure for weight trajectory. Results A linear growth mixture model of participants ( N = 124) revealed a two‐class structure; one class had greater sustained weight loss relative to the other. Greater genus‐level taxonomic changes in the microbiome composition at each time point were associated with being in the more favorable weight trajectory class, after controlling for surgery type. Higher Proteobacteria relative abundance at 1 month was predictive of percentage weight change at 6, 12, 18, and 24 months ( p < 0.05 for all). Conclusions Greater genus‐level taxonomic changes in the gut microbiota are associated with improved weight trajectory. Early changes in the gut microbiota may be an important indicator of MBS outcomes and durability.