Controlled phase (CPHASE) gates can in principle be realized with trapped neutral atoms by making use of the Rydberg blockade. Achieving the ultra-high fidelities required for quantum computation with such Rydberg gates is however compromised by experimental inaccuracies in pulse amplitudes and timings, as well as by stray fields that cause fluctuations of the Rydberg levels. We report here a comparative study of analytic and numerical pulse sequences for the Rydberg CPHASE gate that specifically examines the robustness of the gate fidelity with respect to such experimental perturbations. Analytical pulse sequences of both simultaneous and stimulated Raman adiabatic passage (STIRAP) are found to be at best moderately robust under these perturbations. In contrast, optimal control theory is seen to allow generation of numerical pulses that are inherently robust within a predefined tolerance window. The resulting numerical pulse shapes display simple modulation patterns and their spectra contain only one additional frequency beyond the basic resonant Rydberg gate frequencies. Pulses of such low complexity should be experimentally feasible, allowing gate fidelities of order 99.90 - 99.99 to be achievable under realistic experimental conditions.