Pediatric acute-onset neuropsychiatric syndrome (PANS) and pediatric autoimmune neuropsychiatric disorders associated with streptococcal infections syndrome (PANDAS) are conditions that impair brain normal neurologic function, resulting in the sudden onset of tics, obsessive-compulsive disorder, and other behavioral symptoms. Recent studies have emphasized the crosstalk between gut and brain, highlighting how gut composition can influence behavior and brain functions. Thus, the present study investigates the relationship between PANS/PANDAS and gut microbiota ecology. The gut composition of a cohort of 30 patients with PANS/PANDAS was analyzed and compared to control subjects using 16S rRNA-based metagenomics. Data were analyzed for their α- and β-diversity; differences in bacterial distribution were detected by Wilcoxon and LEfSe tests, while metabolic profile was predicted via PICRUSt software. These analyses demonstrate the presence of an altered bacterial community structure in PANS/PANDAS patients with respect to controls. In particular, ecological analysis revealed the presence of two main clusters of subjects based on age range. Thus, to avoid age bias, data from patients and controls were split into two groups: 4-8 years old and >9 years old. The younger PANS/PANDAS group was characterized by a strong increase in Bacteroidetes; in particular, Bacteroides, Odoribacter, and Oscillospira were identified as potential microbial biomarkers of this composition type. Moreover, this group exhibited an increase of several pathways concerning the modulation of the antibody response to inflammation within the gut as well as a decrease in pathways involved in brain function (i.e., SCFA, D-alanine and tyrosine metabolism, and the dopamine pathway). The older group of patients displayed a less uniform bacterial profile, thus impairing the identification of distinct biomarkers. Finally, Pearson's analysis between bacteria and anti-streptolysin O titer reveled a negative correlation between genera belonging to Firmicutes phylum and anti-streptolysin O while a positive correlation was observed with Odoribacter. In conclusion, this study suggests that streptococcal infections alter gut bacterial communities leading to a pro-inflammatory status through the selection of specific bacterial strains associated with gut inflammation and immune response activation. These findings highlight the possibility of studying bacterial biomarkers associated with this disorder and might led to novel potential therapeutic strategies.