In theoretical physics, general covariance, also known as diffeomorphism covariance or general invariance, consists of the invariance of the form of physical laws under arbitrary differentiable coordinate transformations. The essential idea is that coordinates do not exist a priori in nature, but are only artifices used in describing nature, and hence should play no role in the formulation of fundamental physical laws.
A physical law expressed in a generally covariant fashion takes the same mathematical form in all coordinate systems, and is usually expressed in terms of tensor fields. The classical (non-quantum) theory of electrodynamics is one theory that has such a formulation.
Albert Einstein proposed this principle for his special theory of relativity; however, that theory was limited to spacetime coordinate systems related to each other by uniform inertial motion. Einstein recognized that the general principle of relativity should also apply to accelerated relative motions, and he used the newly developed tool of tensor calculus to extend the special theory's global Lorentz covariance (applying only to inertial frames) to the more general local Lorentz covariance (which applies to all frames), eventually producing his general theory of relativity. The local reduction of the metric tensor to the Minkowski metric tensor corresponds to free-falling (geodesic) motion, in this theory, thus encompassing the phenomenon of gravitation.
Much of the work on classical unified field theories consisted of attempts to further extend the general theory of relativity to interpret additional physical phenomena, particularly electromagnetism, within the framework of general covariance, and more specifically as purely geometric objects in the spacetime continuum.
The relationship between general covariance and general relativity may be summarized by quoting a standard textbook:
Mathematics was not sufficiently refined in 1917 to cleave apart the demands for "no prior geometry" and for a geometric, coordinate-independent formulation of physics. Einstein described both demands by a single phrase, "general covariance". The "no prior geometry" demand actually fathered general relativity, but by doing so anonymously, disguised as "general covariance", it also fathered half a century of confusion.
A more modern interpretation of the physical content of the original principle of general covariance is that the Lie group GL4(R) is a fundamental "external" symmetry of the world. Other symmetries, including "internal" symmetries based on compact groups, now play a major role in fundamental physical theories.