Respiratory distress syndrome (RDS) is a major morbidity of prematurity. In this case–control study, we prospectively evaluated whether untargeted metabolomic analysis (gas chromatography–mass spectrometry) of the gastric fluid could predict the need for surfactant in very preterm neonates. 43 infants with RDS necessitating surfactant (cases) were compared with 30 infants who were not treated with surfactant (controls). Perinatal–neonatal characteristics were recorded. Significant differences in gastric fluid metabolites (L-proline, L-glycine, L-threonine, acetyl-L-serine) were observed between groups, but none could solely predict surfactant administration with high accuracy. Univariate analysis revealed significant predictors of surfactant administration involving gastric fluid metabolites (L-glycine, acetyl-L-serine) and clinical parameters (gestational age, Apgar scores, intubation in the delivery room). Multivariable models were constructed for significant clinical variables as well as for the combination of clinical variables and gastric fluid metabolites. The AUC value of the first model was 0.69 (95% CI 0.57–0.81) and of the second, 0.76 (95% CI 0.64–0.86), in which acetyl-L-serine and intubation in the delivery room were found to be significant predictors of surfactant therapy. This investigation adds to the current knowledge of biomarkers in preterm neonates with RDS, but further research is required to assess the predictive value of gastric fluid metabolomics in this field.