Context. Globular clusters with their large populations of millisecond pulsars (MSPs) are believed to be potential emitters of high-energy gamma-ray emission. The observation of this emission provides a powerful tool to assess the millisecond pulsar population of a cluster, is essential for understanding the importance of binary systems for the evolution of globular clusters, and provides complementary insights into magnetospheric emission processes. Aims. Our goal is to constrain the millisecond pulsar populations in globular clusters from analysis of gamma-ray observations. Methods. We use 546 days of continuous sky-survey observations obtained with the Large Area Telescope aboard the Fermi Gamma-ray Space Telescope to study the gamma-ray emission towards 13 globular clusters. Results. Steady point-like high-energy gamma-ray emission has been significantly detected towards 8 globular clusters. Five of them (47 Tucanae, Omega Cen, NGC 6388, Terzan 5, and M 28) show hard spectral power indices (0.7 < Gamma < 1.4) and clear evidence for an exponential cut-off in the range 1.0-2.6 GeV, which is the characteristic signature of magnetospheric emission from MSPs. Three of them (M 62, NGC 6440 and NGC 6652) also show hard spectral indices (1.0 < Gamma < 1.7), however the presence of an exponential cut-off can not be unambiguously established. Three of them (Omega Cen, NGC 6388, NGC 6652) have no known radio or X-ray MSPs yet still exhibit MSP spectral properties. From the observed gamma-ray luminosities, we estimate the total number of MSPs that is expected to be present in these globular clusters. We show that our estimates of the MSP population correlate with the stellar encounter rate and we estimate 2600-4700 MSPs in Galactic globular clusters, commensurate with previous estimates. Conclusions. The observation of high-energy gamma-ray emission from globular clusters thus provides a reliable independent method to assess their millisecond pulsar populations.