One-third of the world's population has been infected with Mycobacterium tuberculosis (M. tuberculosis), a primary pathogen of the mammalian respiratory system, while about 10% of latent infections progress to active tuberculosis (TB), indicating that host and environmental factors may determine the outcomes such as infection clearance/persistence and treatment prognosis. The gut microbiota is essential for development of host immunity, defense, nutrition and metabolic homeostasis. Thus, the pattern of gut microbiota may contribute to M. tuberculosis infection and prognosis. In current study we characterized the differences in gut bacterial communities in new tuberculosis patients (NTB), recurrent tuberculosis patients (RTB), and healthy control. The abundance-based coverage estimator (ACE) showed the diversity index of the gut microbiota in the patients with recurrent tuberculosis was increased significantly compared with healthy controls (p < 0.05). At the phyla level, Actinobacteria and Proteobacteria, which contain many pathogenic species, were significantly enriched in the feces RTB patients. Conversely, phylum Bacteroidetes, containing a variety of beneficial commensal organisms, was reduced in the patients with the recurrent tuberculosis compared to healthy controls. The Gram-negative genus Prevotella of oral origin from phylum of Bacteroidetes and genus Lachnospira from phylum of Firmicutes were significantly decreased in both the new and recurrent TB patient groups, compared with the healthy control group (p < 0.05). We also found that there was a positive correlation between the gut microbiota and peripheral CD4+ T cell counts in the patients. This study, for the first time, showed associations between gut microbiota with tuberculosis and its clinical outcomes. Maintaining eubiosis, namely homeostasis of gut microbiota, may be beneficial for host recovery and prevention of recurrence of M. tuberculosis infection.