Implementing precise operations on quantum systems is one of the biggest challenges for building quantum devices in a noisy environment. Dynamical decoupling (DD) attenuates the destructive effect of the environmental noise, but so far it has been used primarily in the context of quantum memories. Here, we present a general scheme for combining DD with quantum logical gate operations and demonstrate its performance on the example of an electron spin qubit of a single nitrogen-vacancy center in diamond. We achieve process fidelities >98% for gate times that are 2 orders of magnitude longer than the unprotected dephasing time $T_{2}$.