In gated radiotherapy, the accuracy of treatment delivery is determined by the accuracy with which both the imaging and treatment beams are gated. If the time delays (the time between the target entering/leaving the gated region and the first/last image acquired or treatment beam on/off) for the imaging and treatment systems are in the opposite directions, they may increase the required internal target volume (ITV) margin, above that indicated by the tolerance for either system measured individually. We measured a gating system's time delay on 3 fluoroscopy systems, and 3 linear accelerator treatment beams, using a motion phantom of known geometry, varying gating type (amplitude vs. phase), beam energy, dose rate, and period. The average beam on imaging time delays were -0.04 +/- 0.05 s (amplitude, 1 SD), -0.11 +/- 0.04 s (phase); while the average beam off imaging time delays were -0.18 +/- 0.08 s (amplitude) and -0.15 +/- 0.04 s (phase). The average beam on treatment time delays were 0.09 +/- 0.02 s (amplitude, 1 SD), 0.10 +/- 0.03 s (phase); while the average beam off time delays for treatment beams were 0.08 +/- 0.02 s (amplitude) and 0.07 +/- 0.02 s (phase). The negative value indicates the images were acquired early, and the positive values show the treatment beam was triggered late. We present a technique for calculating the margin necessary to account for time delays and found that the difference between the imaging and treatment time delays required a significant increase in the ITV margin in the direction of tumor motion at the gated level.