Obesity has consistently been associated with an increased risk of metabolic abnormalities such as diabetes, hyperlipidemia, and cardiovascular diseases, as well as the development of several types of cancer. In recent decades, unfortunately, the rate of overweight/obesity has increased significantly among adults and children. A growing body of evidence shows that there is a relationship between metabolic disorders such as obesity and the composition of the gut microbiota. Additionally, inflammation is considered to be a driving force in the obesity–gut microbiota connection. Therefore, it seems that anti-inflammatory nutrients, foods, and/or diets can play an essential role in the management of obesity by affecting the intestinal flora and controlling inflammatory responses. In this review, we describe the links between the gut microbiota, obesity, and inflammation, and summarize the benefits of anti-inflammatory diets in preventing obesity.