Neurodevelopmental disorders, including autism spectrum disorder (ASD), are defined by core behavioral impairments; however, subsets of individuals display a spectrum of gastrointestinal (GI) abnormalities. We demonstrate GI barrier defects and microbiota alterations in the maternal immune activation (MIA) mouse model that is known to display features of ASD. Oral treatment of MIA offspring with the human commensal Bacteroides fragilis corrects gut permeability, alters microbial composition, and ameliorates defects in communicative, stereotypic, anxiety-like and sensorimotor behaviors. MIA offspring display an altered serum metabolomic profile, and B. fragilis modulates levels of several metabolites. Treating naive mice with a metabolite that is increased by MIA and restored by B. fragilis causes certain behavioral abnormalities, suggesting that gut bacterial effects on the host metabolome impact behavior. Taken together, these findings support a gut-microbiome-brain connection in a mouse model of ASD and identify a potential probiotic therapy for GI and particular behavioral symptoms in human neurodevelopmental disorders.