Diet is a major factor that shapes the gut microbiome1, but the consequences of diet-induced changes in the microbiome for host pathophysiology remain poorly understood. We conducted a randomized human intervention study using a very-low-calorie diet (NCT01105143). Although metabolic health was improved, severe calorie restriction led to a decrease in bacterial abundance and restructuring of the gut microbiome. Transplantation of post-diet microbiota to mice decreased their body weight and adiposity relative to mice that received pre-diet microbiota. Weight loss was associated with impaired nutrient absorption and enrichment in Clostridioides difficile, which was consistent with a decrease in bile acids and was sufficient to replicate metabolic phenotypes in mice in a toxin-dependent manner. These results emphasize the importance of diet-microbiome interactions in modulating host energy balance and the need to understand the role of diet in the interplay between pathogenic and beneficial symbionts.