Type 2 diabetes mellitus (T2DM) is one of the common metabolic diseases in the world. Due to the rise in morbidity and mortality, it has become a global health problem. To date, T2DM still cannot be cured, and its intervention measures mainly focus on glucose control as well as the prevention and treatment of related complications. Interestingly, the gut microbiota plays an important role in the development of metabolic diseases, especially T2DM. In this review, we introduce the characteristics of the gut microbiota in T2DM population, T2DM animal models, and diabetic complications. In addition, we describe the molecular mechanisms linking host and the gut microbiota in T2DM, including the host molecules that induce gut microbiota dysbiosis, immune and inflammatory responses, and gut microbial metabolites involved in pathogenesis. These findings suggest that we can treat T2DM and its complications by remodeling the gut microbiota through interventions such as drugs, probiotics, prebiotics, fecal microbiota transplantation (FMT) and diets.