Bacille Calmette-Guerin (BCG) vaccine can elicit good TH1 responses in neonates. We hypothesized that the pioneer gut microbiota affects vaccine T cell responses. Infants who are HIV exposed but uninfected (iHEU) display an altered immunity to vaccination. BCG-specific immune responses were analyzed at 7 weeks of age in iHEU, and responses were categorized as high or low. Bifidobacterium longum subsp. infantis was enriched in the stools of high responders, while Bacteroides thetaiotaomicron was enriched in low responders at time of BCG vaccination. Neonatal germ-free or SPF mice orally gavaged with live B. infantis exhibited significantly higher BCG-specific T cells compared with pups gavaged with B. thetaiotaomicron. B. infantis and B. thetaiotaomicron differentially affected stool metabolome and colonic transcriptome. Human colonic epithelial cells stimulated with B. infantis induced a unique gene expression profile versus B. thetaiotaomicron. We thus identified a causal role of B. infantis in early-life antigen-specific immunity.