Results of NMR studies of nuclear spin-lattice relaxation in liquid metallic gallium confined within random pore networks of two different porous glasses with 16 and 2 nm pore sizes are presented. The measurements were run in the temperature range from 330 K to confined gallium freezing. Relaxation for both gallium isotopes $^{71}\mathrm{Ga}$ and $^{69}\mathrm{Ga}$ was found to accelerate remarkably compared to the bulk melt, the dominant mechanism of relaxation changing from magnetic to quadrupolar. The correlation time of electric field gradient fluctuations caused by atomic motion was estimated at various temperatures using data for quadrupolar relaxation contribution and was found to increase drastically compared to bulk, which corresponded to a pronounced slowdown of atomic mobility in confined liquid gallium. The influence of confinement was more effective for smaller pore sizes. The temperature dependence of the correlation time for confined gallium was found to be noticeably stronger than in bulk, an additional slowdown of atomic mobility being observed at low temperatures.