Type 2 diabetes (T2D) is a serious disease. The gut microbiota (GM) has recently been identified as a new potential risk factor in addition to well-known diabetes risk factors. To investigate the GM composition in association with the dietary patterns in patients with different glucose tolerance, we analyzed 92 patients: with normal glucose tolerance (n=48), prediabetes (preD, n=24), and T2D (n=20). Metagenomic analysis was performed using 16S rRNA sequencing. The diet has been studied by a frequency method with a quantitative evaluation of food intake using a computer program. Microbiota in the samples was predominantly represented by Firmicutes, in a less degree by Bacteroidetes. Blautia was a dominant genus in all samples. The representation of Blautia, Serratia was lower in preD than in T2D patients, and even lower in those with normal glucose tolerance. After the clustering of the samples into groups according to the percentage of protein, fat, carbohydrates in the diet, the representation of the Bacteroides turned to be lower and Prevotella abundance turned to be higher in carbohydrate cluster. There were more patients with insulin resistance, T2D in the fat–protein cluster. Using the Calinski–Harabasz index identified the samples with more similar diets. It was discovered that half of the patients with a high-fat diet had normal tolerance, the others had T2D. The regression analysis showed that these T2D patients also had a higher representation of Blautia. Our study provides the further evidence concerning the structural modulation of the GM in the T2DM pathogenesis depending on the dietary patterns.