Abdominal organ motion may lead to considerable uncertainties in pencil-beam scanning (PBS) proton therapy of pancreatic cancer. Beam gating, where irradiation only occurs in certain breathing phases in which the gating conditions are fulfilled, may be an option to reduce the interplay effect between tumor motion and the scanning beam. This study aims to, first, determine suitable gating windows with respect to effectiveness (low interplay effect) and efficiency (high duty cycles). Second, it investigates whether beam gating allows for a better mitigation of the interplay effect along the treatment course than free-breathing irradiations.Based on synthetic 4D-CTs, generated by warping 3D-CTs with vector fields extracted from time-resolved magnetic resonance imaging (4D-MRI) for 8 pancreatic cancer patients, 4D dose calculations (4DDC) were performed to analyze the duty cycle and homogeneity index HI = d5/d95 for four different gating scenarios. These were based on either fixed threshold values of CTV (clinical target volume) mean or maximum motion amplitudes (5 mm), relative CTV motion amplitudes (30%) or CTV overlap criteria (95%), respectively. 4DDC for 28-fractions treatment courses were performed with fixed and variable initial breathing phases to investigate the fractionation-induced mitigation of the interplay effect.Gating criteria, based on patient-specific relative 30% CTV motion amplitudes, showed the significantly best HI values with sufficient duty cycles, in contrast to inferior results by either fixed gating thresholds or overlap criteria. For gated treatments with 28 fractions, less fractionation-induced mitigation of the interplay effect was observed for gating criteria with gating windows ⩾30%, compared to free-breathing treatments. The gating effectiveness for multiple fractions was improved by allowing a variable initial breathing phase.Gating with relative amplitude thresholds are effective for proton therapy of pancreatic cancer. By combining beam gating with variable initial breathing phases, a pronounced mitigation of the interplay effect by fractionation can be achieved.