Diabetes is a group of metabolic disorders characterized by persistent hyperglycemia and has become a major public health concern. Autoimmune type 1 diabetes (T1D) and insulin resistant type 2 diabetes (T2D) are the two main types. A combination of genetic and environmental factors contributes to the development of these diseases. Gut microbiota have emerged recently as an essential player in the development of T1D, T2D and obesity. Altered gut microbiota have been strongly linked to disease in both rodent models and humans. Both classic 16S rRNA sequencing and shot-gun metagenomic pyrosequencing analysis have been successfully applied to explore the gut microbiota composition and functionality. This review focuses on the association between gut microbiota and diabetes and discusses the potential mechanisms by which gut microbiota regulate disease development in T1D, T2D and obesity.