Respiratory distress syndrome (RDS) is a major respiratory morbidity associated with prematurity. In this case-control study, we prospectively evaluated whether targeted metabolomic analysis (gas chromatography–mass spectrometry) of the gastric fluid obtained from very preterm neonates (< 32 weeks’ gestation) during the first hour after birth could predict the need for exogenous surfactant for the treatment of RDS. 43 infants with RDS necessitating surfactant (cases) were compared with 30 infants with mild or no RDS (controls) who were not treated with surfactant. Perinatal and neonatal characteristics were recorded. Univariate analysis showed significant differences between the two groups in gastric fluid metabolites (L-glycine and acetyl-L-serine) and clinical parameters (gestational age, 1- and 5-minute Apgar scores, and intubation in the delivery room). Moreover, multivariate analysis revealed intubation in the delivery room as the most potent clinical predictor of surfactant administration [AUC of 0.69 (95% CI 0.57-0.81)]. The combination of metabolomic and clinical data allowed for the construction of a model with good accuracy [AUC 0.76 (95% CI 0.64-0.86)] in predicting surfactant replacement therapy. Further research is required to explore the role of gastric fluid metabolomics in the prediction of RDS and other neonatal outcomes.