Although physiologic and neurologic consequences of micronutrient deficiencies have been addressed extensively, less is known about their impact on developing gut microbiota. Vitamin B12 deficiency is a common micronutrient deficiency in infants. We aimed to analyze the gut microbial composition of exclusively breastfed infants aged between 4 and 6 months with and without vitamin B12 deficiency by 16S rRNA gene sequencing. In a subgroup of infants with vitamin B12 deficiency, stool samples are recollected and reanalyzed after vitamin B12 supplementation. A total of 88 infants' stool samples (median age 4 months [IQR 4-5], 50% males) were analyzed, of which 28 (31.8%) were vitamin B12 sufficient and 60 (68.2%) were vitamin B12 insufficient. Comparisons between vitamin B12-sufficient and vitamin B12-insufficient infants revealed no evidence of differences in the microbiota. Proteobacteria, Firmicutes, Actinobacteria, and Bacteroidetes were the most abundant phyla in all groups. There was no difference between the pre- and post-treatment composition of gut microbiota. Conclusion: Vitamin B12-deficient infants have similar gut microbial composition as vitamin B12-sufficient infants. Since the samples were collected at an early period of life and the exposure to deficiency was relatively short, it may be possible that the effects were not fully established.