Gauge-fixing term for the Hilbert action In Yang-Mills theories, it is possible to fix the gauge directly in the action, via a gauge fixing term of the form (for EM for instance) 
$$S_{EM} = \int_D d^nx [-\frac{1}{4}F^{\mu\nu} F_{\mu\nu} - \frac{1}{2\xi} (\partial_\mu A^\mu)^2]$$
The Einstein field equations are also invariant under something similar to a gauge transformation, diffeomorphism invariance. This is usually achieved by imposing coordinate conditions such as the harmonic gauge.
Is there an equivalent process of gauge fixing for general relativity? Some term of the action that would generate, for instance, the harmonic condition
$$\partial_\mu(g^{\mu\nu} \sqrt{-g}) = 0$$
or any other such gauge
 A: Yes. I'll give an overview of how this can be done for perturbative gravity.
For a perturbed metric $g^f_{\mu\nu}=g_{\mu\nu}+\kappa h_{\mu\nu}$, define $H_{\mu\nu}:=h_{\mu\nu}-kh g_{\mu\nu}$. (The symbol $H_{\mu\nu}$ is not standard, but will help me with concision.) Here the choice of $k\in\mathbb{R}$ is a gauge choice (this is separate from the $\xi$-choosing gauge you already know about), with the de Donder gauge $k=\frac{1}{2}$ being popular due to a number of advantages I won't go into here. The gauge-fixing term you want is $-\frac{1}{2\xi}(\kappa \nabla_\mu H^{\mu\nu})^2$, where the squaring contracts the remaining $^\nu$ index (obviously it's a subscript in one index). The covariant derivative $\nabla_\mu$ commutes with $g_{\mu\nu}$.
If you read Sec. 2.6 & Chapter 4 of my thesis here, you'll learn a little more about an alternative approach that allows us to use the Landau gauge $\xi=0$ by introducing another field. (The same thing is possible in Yang-Mills too, which is the subject of some earlier parts of Chapter 2.) These sections discuss the Faddeev-Popov ghosts too. Sec. 2.6 also discusses the more complicated vielbein formalism sometimes used to formulate the gauge-fixing term. (By "vielbein" I mean the $D$-dimensional generalisation of a $4$-dimensional spacetime's vierbein or tetrad formalism.)
