Is it the mass that bends spacetime, or is it the gravity? I had understood that mass bends spacetime and that curvature generates gravity, but I have recently read that what bends spacetime is gravity.
Which comes first? Does the mass generate gravity, and then gravity generate the bending in spacetime? Or does the mass generate the bending in spacetime, and then this curvature generates gravity?
 A: The main equation in General Relativity are the Einstein Field Equations, which read
$$G_{ab} = 8 \pi T_{ab}.$$
$G_{ab}$ is an object describing the curvature of spacetime, while $T_{ab}$ is an object describing the matter content known as the stress-energy-momentum tensor. Notice its name: in General Relativity, it is not only mass that bends spacetime, but energies (think of $E = mc^2$), stresses, and momenta in general. In John A. Wheeler's famous interpretation of this expression, "Space-time tells matter how to move; matter tells space-time how to curve".
In this sense, we see something immediately: matter tells spacetime how to curve, so matter generates the geometry. This curved geometry leads to what we call gravity: objects follow "straight lines" in the curved spacetime (more specifically, geodesics) and as a consequence we see them moving in curved paths through space, which is what we call gravity.
However, notice the equation also goes the other way: spacetime tells matter how to move. Not only that, but the Einstein Field Equations are non-linear. These two facts mean that curvature also leads to more curvature. Intuitively speaking, the "energy of the gravitational field" also bends spacetime (very roughly speaking, for one can't define gravitational energy in a direct way, but the idea is pretty much this one). In this sense, curvature leads to more curvature or, if you prefer, gravity leads to more curvature, which leads to more gravity.
In summary, both of your affirmations make sense, but in different senses. Gravity does make spacetime to bend (and leads, for example, to the propagation of gravitational waves) due to the fact that the Einstein Field Equations are non-linear, but matter (and, in particular, mass) also does bend spacetime. The bending of spacetime leads to matter following curved paths through space (though they are "as straight as possible" through spacetime), which is what we refer to as gravity.
A: I'll try to provide a bit more technical answer to this question. An important consequence of using curved manifold is that we have to replace the idea of "straight lines" with geodesics and account for the possibility that "parallel rays" can deviate due to presence of local curvature. These deviation of geodesics is given by geodesic deviation equation: $$D^2q^a={R_{bcd}}^al^bq^cl^d$$where $l$ is associated to the momentum of particle or light ray, operator $D=l^a\nabla_a$ and $q^a$ is the displacement vector b/w adjacent geodesics. The total intrinsic curvature at any point is given by Riemann curvature tensor $R_{abcd}$. Now, the above equation is pretty general and is independent of how we couple gravity with matter field. Einstein's field equations relate matter field $T_{ab}$ with the trace part of Riemann tensor, called Ricci tensor $R_{ab}$ : $$R_{ab}-\Lambda g_{ab} = \kappa \left(T_{ab}-\frac{1}{2}Tg_{ab}\right)$$ Using the Ricci decomposition, we can write:
$$R_{abcd}=\underbrace{C_{abcd}}_{trace-free}+\underbrace{(g_{c[a}R_{b]d}-g_{d[a}R_{b]c})-\frac{1}{6}g_{a[c}g_{d]b}R}_{depends\;on\;T_{ab}}$$The remaining trace free part $C_{abcd}$ (called the Weyl tensor) contains gravitational degrees of freedom and it depends on both symmetry associated to our metric $g_{ab}$ and matterfield $T_{ab}$ via Bianchi identity. Given $T_{ab}$, one could still play around with metric and obtain various kind of solutions. Example: for $T_{ab}=0$, we have different classes of solutions - Schwarzschild solution, Kerr-solution, plane fronted or spherical gravitational waves etc, all of which corresponds to different physical scenarios.
In conclusion, we can say that both matter field and gravity contributes to total intrinsic curvature : gravity is the conformal curvature defined by $C_{abcd}$, while matter field directly influences the Ricci curvature (given by EFE) and indirectly contributes to $C_{abcd}$ (1st Bianchi identity). The obtained total curvature $R_{abcd}$ in turn influences trajectories of particles given by the geodesic deviation equation.
