Infant colic is a condition of unknown cause which can result in carer distress and attachment difficulties. Recent studies have implicated the gut microbiota in infant colic, and certain probiotics have demonstrated possible efficacy. We aim to investigate whether the intestinal microbiota composition in infants with colic is associated with cry/fuss time at baseline, persistence of cry/fuss at 4-week follow-up, or child behavior at 2 years of age. Fecal samples from infants with colic (n = 118, 53% male) were analyzed using 16S rRNA sequencing. After examining the alpha and beta diversity of the clinical samples, we performed a differential abundance analysis of the 16S data to look for taxa that associate with baseline and future behavior, while adjusting for potential confounding variables. In addition, we used random forest classifiers to evaluate how well baseline gut microbiota can predict future crying time. Alpha diversity of the fecal microbiota was strongly influenced by birth mode, feed type, and child gender, but did not significantly associate with crying or behavioral outcomes. Several taxa within the microbiota (including Bifidobacterium, Clostridium, Lactobacillus, and Klebsiella) associate with colic severity, and the baseline microbiota composition can predict further crying at 4 weeks with up to 65% accuracy. The combination of machine learning findings with associative relationships demonstrates the potential prognostic utility of the infant fecal microbiota in predicting subsequent infant crying problems.