Background Assessment of appropriate brain myelination on T1- and T2-weighted MRI scans is based on gestationally corrected age (GCA) and requires subjective visual inspection of the brain with knowledge of normal myelination milestones. Purpose To develop a convolutional neural network (CNN) capable of estimating neonatal and infant GCA based on brain myelination on MRI scans. Materials and methods In this retrospective study from one academic medical center, brain MRI scans of patients aged 0-25 months with reported normal myelination were consecutively collected between January 1995 and June 2019. The GCA at MRI was manually calculated. After exclusion criteria were applied, T1- and T2-weighted MRI scans were preprocessed with skull stripping, linear registration, z scoring for normalization, and downsampling. A three-dimensional regression CNN was trained to predict GCA using mean absolute error (MAE) as its loss function. Attention maps were calculated using layer-wise relevance propagation. Models were validated on an external test set from the National Institutes of Health (NIH). Model MAEs were compared using Kruskal-Wallis and Mann-Whitney tests. Results A total of 518 neonates and infants (mean GCA, 67 weeks ± 33 [SD], 56% male) was included, comprising 469 T1-, 438 T2-, and 389 T1- and T2-weighted studies. Across 10 runs, MAEs of T1-, T2-, and T1- and T2-weighted networks were 9.8 ± 2.3, 9.1 ± 1.9, and 7.7 ± 1.7 weeks, respectively. Attention map analysis demonstrated increased network attention to the cerebellum, posterior white matter, and basal ganglia signal in neonates with GCA of less than 40 weeks and the anterior white matter signal in infants with GCA of more than 120 weeks, corresponding to the known progression of myelination. The T1- and T2-weighted network tested on the external NIH test set had an MAE of 9.1 weeks, which was reduced to 5.9 weeks with further training using half the external test set (P < .001). Conclusion A three-dimensional convolutional neural network can predict the gestationally corrected age of neonates and infants aged 0-25 months based on brain myelination patterns on T1- and T2-weighted MRI scans. © RSNA, 2022 Online supplemental material is available for this article.