We investigated the potential of respiratory gating to mitigate the motion-caused misdosage in lung stereotactic body radiotherapy (SBRT). For fourteen patients with lung tumors, we investigated treatment plans for a gating window (GW) including three breathing phases around the maximum exhalation phase, GW40-60. For a subset of six patients, we also assessed a preceding three-phase GW20-40 and six-phase GW20-70. We analyzed the target volume, lung, esophagus, and heart doses. Using normal tissue complication probability (NTCP) models, we estimated radiation pneumonitis and esophagitis risks . Compared to plans without gating, GW40-60 significantly reduced doses to organs at risk without impairing the tumor doses. On average, the mean lung dose decreased by 0.6 Gy (p < 0.001), treated lung V20Gy by 2.4% (p = 0.003), esophageal dose to 5cc by 2.0 Gy (p = 0.003), and maximum heart dose by 3.2 Gy (p = 0.009). The model-estimated mean risks of 11% for pneumonitis and 12% for esophagitis without gating decreased upon GW40-60 to 7% and 9%, respectively. For the highest-risk patient, gating reduced the pneumonitis risk from 43% to 32%. Gating is most beneficial for patients with high-toxicity risks. Pre-treatment toxicity risk assessment may help optimize patient selection for gating, as well as GW selection for individual patients.