The next-to-next-to-leading order (NNLO) corrections in massless perturbative QCD are derived for the parton distributions of the photon and the deep inelastic structure functions F_1^gamma and F_2^gamma. We present the full photonic coefficient functions at order alpha alpha_s and calculate the first six even-integer moments of the corresponding O(alpha alpha_s^2) photon-quark and photon-gluon splitting functions together with the moments of the alpha alpha_s^2 coefficient functions which enter only beyond NNLO. These results are employed to construct parametrizations of the splitting functions which prove to be sufficiently accurate at least for momentum fractions x >= 0.05. We also present explicit expressions for the transformation from the MS_bar to the DIS_gamma factorization scheme and write down the solution of the evolution equations. The numerical impact of the NNLO corrections is discussed in both schemes.