We construct the anomaly lagrangian involving baryons, mesons and photons in the Skyrme model. The simplest process described by this lagrangian is neutral pion photoproduction on nucleons. The value of the electric dipole amplitude E0+ is calculated and compared with the experimental data. At the pion production threshold, we obtain E0+(anomaly) = 2.99 x 10(-3) fm = 2.12 x 10(-3)/m-pi+. This value together with the low energy theorem prediction E0+(LET) = -2.4 x 10(-3)/m-pi+ gives E0+ = -0.28 x 10(-3)/m-pi+, which is in good agreement with the measured value of E0+ = (-0.5 +/- 0.3) x 10(-3)/m-pi+. This may reconcile the long-standing difference between the theoretical prediction and the experimental data.