In theoretical physics, a gravitational anomaly is an example of a gauge anomaly: it is an effect of quantum mechanics–usually a one-loop diagram—that invalidates the general covariance of a theory of general relativity combined with some other fields. The adjective "gravitational" is derived from the symmetry of a gravitational theory, namely from general covariance. A gravitational anomaly is generally synonmous with diffeomorphism anomaly, since general covariance is symmetry under coordinate reparametrization; i.e. diffeomorphism.
General covariance is the basis of general relativity, the current theory of gravitation. Moreover, it is necessary for the consistency of any theory of quantum gravity, since it is required in order to cancel unphysical degrees of freedom with a negative norm, namely gravitons polarized along the time direction. Therefore, all gravitational anomalies must cancel out.
The anomaly usually appears as a Feynman diagram with a chiral fermion running in the loop (a polygon) with n external gravitons attached to the loop where where is the spacetime dimension. Field-theoretic pure gravitational anomalies occur only in even spacetime dimensions. However, diffeomorphism anomalies can occur in the case of an odd-dimensional spacetime manifold with boundary.