The Maxwell equations are invariant under the transformation
$$A_{\mu} \rightarrow A_{\mu} - \dfrac{1}{e}\partial_{\mu}\alpha(x)$$
where $\alpha(x)$ is a phase transformation varying from point to point. The Maxwell Lagrangian can be coupled to a scalar field Lagrangian by stipulating that the scalar field remains invariant under the local phase transformation, and therefore a covariant derivative needs to be defined in order to properly effect the transformation instead of the ordinary derivative given by
$$D_{\mu} \phi(x) = \partial_{\mu} \phi(x) + ieA_{\mu}(x)\phi(x) $$ with the $A_{\mu}$ transforming again as
$$A_{\mu} \rightarrow A_{\mu} - \dfrac{1}{e}\partial_{\mu}\alpha(x)$$
Thus the combined Lagrangian can be written as a gauge invariant function $$L = L_{Maxwell} + L_{scalar}$$. A similar procedure can be done for the general class of Yang-Mills theories.
Suppose if we take only the Einstein - Hilbert Lagrangian, are there gauge transformations on $g_{\mu\nu}$ which leave the Lagrangian invariant in the similar sense as above? (Also I've heard that coordinate invariance constitutes some sort of gauge invariance, I'm not sure how, and whether this sort of gauge transformation is the answer to my problem)
Can I construct and couple gauge invariant scalar fields like in the above example to the Einstein-Hilbert action? How do I do so?
EDIT : Later I found this http://web.mit.edu/edbert/GR/gr5.pdf to be particularly useful to understand diffeomorphism invariance.