We present an analysis of the iron abundance in the hot gas surrounding galaxy groups and clusters. To do this, we first compile and homogenise a large dataset of 79 low-redshift (|z| = 0.03) systems (159 individual measurements) from the literature. Our analysis accounts for differences in aperture size, solar abundance, and cosmology, and scales all measurements using customised radial profiles for the temperature (T), gas density, and iron abundance (Z). We then compare this dataset to groups and clusters in the L-Galaxies galaxy evolution model. Our homogenised dataset reveals a tight T-Z relation for clusters, with a scatter in Z of only 0.10 dex and a slight negative gradient. After examining potential measurement biases, we conclude that at least some of this negative gradient has a physical origin. Our model suggests greater accretion of hydrogen in the hottest systems, via stripping of gas from infalling satellites, as a cause. At lower temperatures, L-Galaxies over-estimates Z in groups, indicating that metal-rich gas removal (via e.g. AGN feedback) is required. L-Galaxies provides a reasonable match to the observed Z in the intracluster medium (ICM) of the hottest clusters from at least z ~ 1.3 to 0.3. This is achieved without needing to modify any of the galactic chemical evolution (GCE) model parameters. However, the Z in intermediate-temperature clusters appears to be under-estimated in our model at z = 0. The merits and problems with modifying the GCE modelling to correct this are discussed.