Obesity was once rare, but the last few decades have seen a rapid expansion of the proportion of obese individuals worldwide. Recent work has shown obesity to be associated with a shift in the representation of the dominant phyla of bacteria in the gut, both in humans and animal models. This review summarizes the latest research into the association between microbial ecology and host adiposity, and the mechanisms by which microbes in the gut may mediate host metabolism in the context of obesity. Studies of the effect of excess body fat on the abundances of different bacteria taxa in the gut generally show alterations in the gastrointestinal microbiota, and changes during weight loss. The gastrointestinal microbiota have been shown to impact insulin resistance, inflammation, and adiposity via interactions with epithelial and endocrine cells. Large-scale alterations of the gut microbiota and its microbiome (gene content) are associated with obesity and are responsive to weight loss. Gut microbes can impact host metabolism via signaling pathways in the gut, with effects on inflammation, insulin resistance, and deposition of energy in fat stores. Restoration of the gut microbiota to a healthy state may ameliorate the conditions associated with obesity and help maintain a healthy weight.