To be more precise: Let Psi be the matter source fields forming a basis for an irreducible representation R of the rigid global Lie group G where the action field density L invariant under G. We need a new larger action density L' invariant under the larger locally gauged G(x) where the parameters of G are no longer constants but are arbitrary functions of the overlapping local coordinate charts. L(Psi, Psi,u) -> L(Psi, R(DuPsi), Au) where Au is the spin 1 compensating gauge field "connection".
GR is less direct than Yang-Mills because of the equivalence between local g-forces and stationary non-geodesic observers outside of event horizons. Not all GeoMetroDynamic fields are stationary of course - but the non-stationary corrections (gravity waves) are usually pretty small - definitely small Earthside. In GR the passive no gravity arena for Yang-Mills fields becomes at active player. A^a is the warped tetrad connection. It is spin 1 as a quantum field. The GMD affine connection is secondary essentially (,u is ordinary partial derivative):
GMD connection of Einstein-Cartan theory ~ e^ae^b,u = (I^a + @A^a)(I^b + @A^b),u
this includes possible torsion fields, but not a non-metricity Weyl conformal boost field in which the inner products are anholonomic (path dependent) - the non-metricity 4-potential has no relation to the EM potential which was Weyl's error of 1918. The curl of this conformal boost 4-potential vanishes in a simply connected way for phenomena observed so far.