ABSTRACT The combination of gas-phase oxygen abundances and stellar metallicities can provide us with unique insights into the metal enrichment histories of galaxies. In this work, we compare the stellar and gas-phase metallicities measured within a 1Re aperture for a representative sample of 472 star-forming galaxies extracted from the SAMI Galaxy Survey. We confirm that the stellar and interstellar medium (ISM) metallicities are strongly correlated, with scatter ∼3 times smaller than that found in previous works, and that integrated stellar populations are generally more metal-poor than the ISM, especially in low-mass galaxies. The ratio between the two metallicities strongly correlates with several integrated galaxy properties including stellar mass, specific star formation rate, and a gravitational potential proxy. However, we show that these trends are primarily a consequence of: (a) the different star formation and metal enrichment histories of the galaxies, and (b) the fact that while stellar metallicities trace primarily iron enrichment, gas-phase metallicity indicators are calibrated to the enrichment of oxygen in the ISM. Indeed, once both metallicities are converted to the same ‘element base’ all of our trends become significantly weaker. Interestingly, the ratio of gas to stellar metallicity is always below the value expected for a simple closed-box model, which requires that outflows and inflows play an important role in the enrichment history across our entire stellar mass range. This work highlights the complex interplay between stellar and gas-phase metallicities and shows how care must be taken in comparing them to constrain models of galaxy formation and evolution.