Contrast-enhanced gastrointestinal MRI serves as a non-invasive tool for studying and assessing gastric functions. Previous studies generally have their home-brewed semi-automatic algorithm for assessing gastric motility. This process is time-consuming and susceptible to errors. Here, we used deep learning to establish a fully automatic pipeline for assessing gastric motility with contrast-enhanced gastrointestinal MRI in rats. We cross-validated our analysis against simultaneously recorded electrogastrogram indicating gastric myoelectrical activity. Results from this analysis are consistent with electrogastrogram in terms of time, frequency, and power, and in addition, shed light on more detailed spatial characteristics of gastric motility.