How can I read off the fact that gravity is associated with spin-2 particles from the Einstein-Hilbert action? I have often heard that the gravitational field has spin $2$. How can I read the spin of the field from the Einstein-Hilbert action
$$S=\int \! \mathrm{d}^4x \,\sqrt{|g|} \, \mathcal{R} \, \, \, ?$$
 A: If you linearise the theory such that
$$ g^{\mu \nu}(x) = \eta^{\mu \nu} + h^{\mu \nu}(x) $$
say, you will find that your quantum of gravitation is this tensor $h^{\mu \nu}(x)$. Then clearly it has two free indices, and is what we call a 'spin-2 particle'.
The maths to do the linearisation and prove that it transforms as a spin-2 particle would under Lorentz transformations is quite long and difficult, I find. But if you want a more 'complete' answer I can try. I need to go over it I guess...
A: A common procedure to determine the spin of the excitations of a quantum field is to first determine the conserved currents arising from quasi-symmetries via Noether's theorem. For example, in the case of the Dirac field, described by the Lagrangian,
$$\mathcal{L}=\bar{\psi}(i\gamma^\mu \partial_\mu -m)\psi $$
the associated conserved currents under a translation are,
$$T^{\mu \nu} = i \bar{\psi}\gamma^\mu \partial^\nu \psi - \eta^{\mu \nu} \mathcal{L}$$
and the currents corresponding to Lorentz symmetries are given by,
$$(\mathcal{J}^\mu)^{\rho \sigma} = x^\rho T^{\mu \sigma} - x^\sigma T^{\mu \rho}-i\bar{\psi}\gamma^\mu S^{\rho \sigma} \psi$$
where the matrices $S^{\mu \nu}$ form the appropriate representation of the Lorentz algebra. After canonical quantization, the currents $\mathcal{J}$ become operators, and acting on the states will confirm that, in this case, the excitations carry spin $1/2$. In gravity, we proceed similarly. The metric can be expanded as,
$$g_{\mu \nu} = \eta_{\mu \nu} + f_{\mu \nu}$$
and we expand the field $f_{\mu \nu}$ as a plane wave with operator-valued Fourier coefficients, i.e.
$$f_{\mu \nu} \sim \int \frac{\mathrm{d}^3 p}{(2\pi)^3} \frac{1}{\sqrt{\dots}} \left\{ \epsilon_{\mu \nu} a_p e^{ipx}  + \dots\right\}$$
We only keep terms of linear order $\mathcal{O}(f_{\mu \nu})$, compute the conserved currents analogously to other quantum field theories, and once promoted to operators as well act on the states to determine the excitations indeed have spin $2$. 

Counting physical degrees of freedom
The graviton has spin $2$, and as it is massless only two degrees of freedom. We can verify this in gravitational perturbation theory. We know $h^{ab}$ is a symmetric matrix, and only $d(d+1)/2$ distinct components. In de Donder gauge, $$\nabla^{a}\bar{h}^{ab} = \nabla^a\left(h^{ab}-\frac{1}{2}h g^{ab}\right) = 0$$
which provides us $d$ gauge constraints. There is also a residual gauge freedom, providing that infinitesimally, we shift by a vector field, i.e.
$$X^\mu \to X^\mu + \xi^\mu$$
providing $\square \xi^\mu + R^\mu_\nu \xi^\nu = 0$, which restricts us by $d$ as well. Therefore the total physical degrees of freedom are,
$$\frac{d(d+1)}{2}-2d = \frac{d(d-3)}{2}$$
If $d=4$, the graviton indeed has only two degrees of freedom.

Important Caveat
Although we often find a field with a single vector index has spin one, with two indices spin two, and so forth, it is not always the case, and determining the spin should be done systematically. Consider, for example, the Dirac matrices, which satisfy the Clifford algebra,
$$\{ \Gamma^a, \Gamma^b\} = 2g^{ab}$$
On an $N$-dimensional Kahler manifold $K$, if we work in local coordinates $z^a$, with $a = 1,\dots,N$, and the metric satisfies $g^{ab} = g^{\bar{a} \bar{b}} = 0$, the expression simplifies:
$$\{ \Gamma^a, \Gamma^b\} = \{ \Gamma^{\bar{a}}, \Gamma^{\bar{b}}\} = 0$$
$$\{ \Gamma^a, \Gamma^{\bar{b}}\} = 2g^{ab}$$
Modulo constants, we see that we can think of $\Gamma^a$ as an annihilation operator, and $\Gamma^{\bar{b}}$ as a creation operator for fermions. Given that we define $\lvert \Omega \rangle$ as the Fock vacuum, we can define a general spinor field $\psi$ on the Kahler manifold $K$ as,
$$\psi(z^a,\bar{z}^{\bar{a}}) = \phi(z^a,\bar{z}^{\bar{a}}) \lvert \Omega \rangle + \phi_{\bar{b}}(z^a,\bar{z}^{\bar{a}}) \Gamma^{\bar{b}} \lvert \Omega \rangle + \dots$$
Given that $\phi$ has no indices, we would expect it to be a spinless field, but it can interact with the $U(1)$ part of the spin connection. Interestingly, we can only guarantee that $\phi$ is neutral if the manifold $K$ is Ricci-flat, in which case it is Calabi-Yau manifold.
