The gut microbiota play a crucial role in maintaining host health and have a significant impact on human health and disease. In this study, we investigated the alpha diversity of gut microbiota in COVID-19 patients and analyzed the impact of COVID-19 variants, antibiotic treatment, type 2 diabetes (T2D), and metformin therapy on gut microbiota composition and diversity. We used a culture-based method to analyze the gut microbiota and calculated alpha-diversity using the Shannon H′ and Simpson 1/D indices. We collected clinical data, such as the length of hospital stay (LoS), C-reactive protein (CRP) levels, and neutrophil-to-lymphocyte ratio. We found that patients with T2D had significantly lower alpha-diversity than those without T2D. Antibiotic use was associated with a reduction in alpha-diversity, while metformin therapy was associated with an increase. We did not find significant differences in alpha-diversity between the Delta and Omicron groups. The length of hospital stay, CRP levels, and NLR showed weak to moderate correlations with alpha diversity. Our findings suggest that maintaining a diverse gut microbiota may benefit COVID-19 patients with T2D. Interventions to preserve or restore gut microbiota diversity, such as avoiding unnecessary antibiotic use, promoting metformin therapy, and incorporating probiotics, may improve patient outcomes.