The exact electromagnetic gauge invariance of the nonlinear gyrokinetic theory is discussed. It is shown that the guiding-center distribution function is an electromagnetic gauge invariant with all the terms in the nonlinear gyrokinetic equations retained. δ is the amplitude ordering parameter of the perturbations. All the terms have to be retained in the nonlinear gyrokinetic simulation to guarantee the electromagnetic gauge invariance.