The early stages of a galaxy's evolution leave an imprint on its metallicity distribution. We discuss the origins and evolution of radial metallicity gradients in discs of spiral galaxies using an analytical chemical evolution model. We explain how radial metallicity gradients in stellar populations are determined by three factors: the radial metallicity profile of the star-forming ISM, radial changes in the star-formation history (in particular inside-out formation), and radial mixing of stars. Under reasonable assumptions, inside-out formation steepens the negative ISM metallicity gradient, but contributes positively to the stellar metallicity gradient, up to inverting the metallicity profile to a positive d[Fe/H]/dR. This reconciles steep negative d[Fe/H]/dR in some high redshift galaxies to generally flatter gradients in local observations.We discuss the evidence for inverse radial metallicity gradients (positive d[X/H]/dR) at high redshifts and the inverse relationship between azimuthal velocity and the metallicity (positive dV φ /d[Fe/H]) of stars for the Milky Way's thick disc. The former can be achieved by high central gas-loss rates and re-distribution processes, e.g. re-accretion of enriched material in conjunction with inside-out formation, and neardisc galactic fountaining. For the Milky Way thick disc, we show that the positive dV φ /d[Fe/H] correlation points to comparable timescales for inside-out formation, initial metal enrichment and SNIa enrichment. We argue that the original ISM metallicity gradient could be inferred with better data from the high-metallicity tail of the alpha enhanced population. Including inside-out formation in our models changes the local vertical metallicity gradient by about −0.2 dex/ kpc, in line with local measurements.