Obesity develops from a prolonged imbalance of energy intake and energy expenditure. However, the relatively recent discovery that the composition and function of the gut microbiota impacts on obesity has lead to an explosion of interest in what is now a distinct research field. Here, research relating to the links between the gut microbiota, diet and obesity will be reviewed under five major headings: (1) the gut microbiota of lean and obese animals, (2) the composition of the gut microbiota of lean and obese humans, (3) the impact of diet on the gut microbiota, (4) manipulating the gut microbiota and (5) the mechanisms by which the gut microbiota can impact on weight gain.