Recent spatially resolved observations of galaxies at z ∼ 0.6–3 reveal that high-redshift galaxies show complex kinematics and a broad distribution of gas-phase metallicity gradients. To understand these results, we use a suite of high-resolution cosmological zoom-in simulations from the Feedback in Realistic Environments project, which include physically motivated models of the multiphase interstellar medium, star formation and stellar feedback. Our simulations reproduce the observed diversity of kinematic properties and metallicity gradients, broadly consistent with observations at z ∼ 0–3. Strong negative metallicity gradients only appear in galaxies with a rotating disc, but not all rotationally supported galaxies have significant gradients. Strongly perturbed galaxies with little rotation always have flat gradients. The kinematic properties and metallicity gradient of a high-redshift galaxy can vary significantly on short time-scales, associated with starburst episodes. Feedback from a starburst can destroy the gas disc, drive strong outflows and flatten a pre-existing negative metallicity gradient. The time variability of a single galaxy is statistically similar to the entire simulated sample, indicating that the observed metallicity gradients in high-redshift galaxies reflect the instantaneous state of the galaxy rather than the accretion and growth history on cosmological time-scales. We find weak dependence of metallicity gradient on stellar mass and specific star formation rate (sSFR). Low-mass galaxies and galaxies with high sSFR tend to have flat gradients, likely due to the fact that feedback is more efficient in these galaxies. We argue that it is important to resolve feedback on small scales in order to produce the diverse metallicity gradients observed.