Globular clusters (GCs) are thought to be ancient relics from the early formative phase of galaxies, although their physical origin remains uncertain1,2. GCs are most numerous around massive elliptical galaxies, where they can exhibit a broad colour dispersion, suggesting a wide metallicity spread3. Here, we show that many thousands of compact and massive ( 5 × 103-3 × 106 M☉) star clusters have formed at an approximately steady rate over, at least, the past 1 Gyr around NGC 1275, the central giant elliptical galaxy of the Perseus cluster. Beyond 1 Gyr, these star clusters are indistinguishable in broadband optical colours from the more numerous GCs. Their number distribution exhibits a similar dependence with luminosity and mass as the GCs, whereas their spatial distribution resembles a filamentary network of multiphase gas4,5 associated with cooling of the intracluster gas6,7. The sustained formation of these star clusters demonstrates that progenitor GCs can form over cosmic history from cooled intracluster gas, thus contributing to both the large number and broad colour dispersion—owing to an age spread, in addition to a spread in metallicity—of GCs in massive elliptical galaxies. The progenitor GCs have minimal masses well below the maximal masses of Galactic open star clusters, affirming a common formation mechanism for star clusters over all mass scales8-10 irrespective of their formative pathways.