  We present a method to recover the gas-phase metallicity gradients from
integral field spectroscopic (IFS) observations of barely resolved galaxies. We
take a forward modelling approach and compare our models to the observed
spatial distribution of emission line fluxes, accounting for the degrading
effects of seeing and spatial binning. The method is flexible and is not
limited to particular emission lines or instruments. We test the model through
comparison to synthetic observations and use downgraded observations of nearby
galaxies to validate this work. As a proof of concept we also apply the model
to real IFS observations of high-redshift galaxies. From our testing we show
that the inferred metallicity gradients and central metallicities are fairly
insensitive to the assumptions made in the model and that they are reliably
recovered for galaxies with sizes approximately equal to the half width at half
maximum of the point-spread function. However, we also find that the presence
of star forming clumps can significantly complicate the interpretation of
metallicity gradients in moderately resolved high-redshift galaxies. Therefore
we emphasize that care should be taken when comparing nearby well-resolved
observations to high-redshift observations of partially resolved galaxies.
