The effect of gravity on clocks was tested to great precision by Vessot et al. (1980, PRL, 45 2081) who launched a hydrogen maser straight up at 8.5 km/sec, and watched its frequency change as it coasted up to 10,000 km altitude and then fell back to Earth. The frequency shift due to gravity was 400 parts per trillion at 10,000 km altitude, and the experimental result agreed with the expected shift to within 28 parts per quadrillion. The space-time diagram on the left above shows the rocket going up and then falling back down. The black dots on its worldline are clock ticks, and a flash of light (red) is emitted at each tick. The observed frequency changes dramatically during the flight due to the Doppler shift as well as the gravitational redshift. The red curve on the plot at right shows the observed frequency of flashes from the rocket clock arriving at the the ground observer. In this exaggerated diagram, with a rocket velocity of 0.8c, the frequency changes from 1/3 to 3 times the actual clock frequency. To separate the Doppler shift from the gravitational effect, a transponder was used: the ground station transmitted pulses (blue) at a fixed rate, which were then echoed by the rocket (green) and detected on the ground. The rate of transponded pulses changed from 1/9 to 9 times the transmitted rate due to the double Doppler shift on the round trip. By dividing the rate of pulses from the rocket clock (red curve) by the square root of the rate of transponded pulses (green curve), one gets the blue curve which just shows the gravitational effect on clock rates. Note that shaking during launch may change the frequency of the rocket clock, which will move the blue curve up and down, but will not change its shape. The clock was in free fall during the entire time that data was taken.
This is based on material put together by Edward L. Wright Ned Wright's Home Page