The purpose of this work is to correct for transient gradient waveform errors in magnetic resonance imaging (MRI), whether from eddy currents, group delay, or gradient amplifier nonlinearities, which are known to affect image quality. An iterative method is proposed to minimize error between desired and measured gradient waveforms, whose success does not depend on accurate knowledge of the gradient system impulse response. The method was applied to half-pulse excitation for 2-D ultra-short echo time (UTE) imaging on a small animal MRI system and to spiral 2-D excitation on a human 7T MRI system. Predistorted gradient waveforms reduced temporal signal variation caused by excitation gradient trajectory errors in 2-D UTE, and improved the quality of excitation patterns produced by spiral excitation pulses. Iterative gradient predistortion is useful for minimizing transient gradient errors without requiring accurate characterization of the gradient system impulse response.