The hypothesized link between gut bacteria and autism spectrum disorder (ASD) has been explored through animal models and human studies with microbiome assessment after ASD presentation. We aimed to prospectively characterize the association between the infant/toddler gut microbiome and ASD-related social behaviors at age 3 years. As part of an ongoing birth cohort gut bacterial diversity, structure, taxa, and function at 6 weeks (n = 166), 1 year (n = 158), 2 years (n = 129), and 3 years (n = 140) were quantified with 16S rRNA gene and shotgun metagenomic sequencing (n = 101 six weeks, n = 103 one year). ASD-related social behavior was assessed at age 3 years using Social Responsiveness Scale (SRS-2) T-scores. Covariate-adjusted linear and permutation-based models were implemented. Microbiome structure at 1 year was associated with SRS-2 total T-scores (p = 0.01). Several taxa at 1, 2, and 3 years were associated with SRS-2 performance, including many in the Lachnospiraceae family. Higher relative abundance of Adlercreutzia equolifaciens and Ruminococcus torques at 1 year related to poorer SRS-2 performance. Two functional pathways, l-ornithine and vitamin B6 biosynthesis, were associated with better social skills at 3 years. Our results support potential associations between early-childhood gut microbiome and social behaviors. Future mechanistic studies are warranted to pinpoint sensitive targets for intervention.