How does the General Theory Of Relativity achieve the goal of showing that the laws of nature have the same form in all frames of reference? The General Theory Of Relativity is often presented as both a theory that extends relativity to all frames of reference (or, at least, to inertial frames and uniformly accelerated ones) and, at the same time, a theory of gravity.
The gravity aspect of the theory is commonly well explained. I know that the details are mathematically intricate, but this is often summarized as " matter/energy tells space how to curve, space tells matter how to move". Under this aspect, the result of the theory seems to be Einstein's field equations.
However, it's more difficult to see, in ordinary popular presentations of the theory,  in which way it realizes its primary goal. What I mean is: how does the GR theory manage to express the laws of nature in a way that keeps their form invariant in all reference frames?
One thing one could expect (maybe very naively) was some sort of extension of the Lorentz transformations, that is, a transformation that would be valid, not only from one inertial reference frame to another but, from an arbitrary inertial frame to any arbitrary ( uniformly) accelerated frame.
But, no popular presentation mentions anything like this. So, I guess that such a universal transformation/ mapping on reference frames is not what is to be expected from the GR theory.
Hence the question: what remains in the theory from its initial goal (namely, as I said, the extension of relativity to all frames of reference)?
Certainly, the Equivalence Principle ( under one form or another) is part of the answer to my question.  (If gravity can be theorized as constant acceleration ( at least locally), I understand that a theory of gravity has something to say as to what the laws of nature look like in an accelerated frame. )
Another element is the fact that the theory makes use of tensors, that have to be invariant under any change of coordinates. And it seems (I took this in Norton's online lecture) that Einstein reduced the requisite of invariance under change of reference frame to a requisite of invariance under change of coordinates.
These are vague ideas I gathered from various sources, but it seems to me that I still cannot figure out in which way this theory of gravity achieves its primary goal in as much as it is a general theory of relativity.
 A: Without gravity

*

*Inertial frames in Cartesian coordinates are related to each other by Lorentz transformations. A "typical" undergraduate course in special relativity will explain these in detail. We are interested in tensors which transform simply under Lorentz transformations. The partial derivative of a Lorentz tensor is a tensor.

*Non-inertial frames are essentially the same, mathematically, as frames in non-Cartesian coordinates. Namely, you take an inertial frame, and perform a general coordinate transformation. To properly handle these general coordinate transformations, it is useful to introduce several geometric objects. For example, the partial derivative of a tensor is no longer a tensor, essentially because under a coordinate transformation there an an extra term where the partial derivative acts on the Jacobian matrix of the transformation. Thus we introduce a covariant derivative, which generalizes the ordinary partial derivative in such a way that it transforms as a tensor under general coordinate transformations. While there is no curvature, developing the mathematical apparatus needed here brings you a long way toward understanding curved spacetimes. In particular, formulating, say, Maxwell's equations using covariant derivatives instead of partial derivatives, means their form will hold in any coordinate system, which includes non-inertial reference frames.

With gravity

*

*Spacetime is curved. All of the machinery developed to handle non-inertial frames in flat space-time (such as covariant derivatives) are needed, as well as additional objects (like the Riemann curvature tensor) that describe the spatial curvature. One way to think of curvature, is that it is an obstruction to finding coordinates where the metric takes the form of the Minkowski metric everywhere in spacetime.


I would say that what distinguishes general relativity and special relativity is the presence of gravity, or space-time curvature. So I would consider non-inertial frames in the absence of gravity as part of special relativity. However, a lot of the mathematical tools you need to describe non-inertial frames, such as covariant derivatives, are also needed to describe curved space-times.
A: To show the laws are invariant, we write them in terms of objects called tensors. But these laws are often differential equations, and partial derivatives don't in general map tensors to tensors. In general relativity (and similar theories of gravity; GR is conceptually the simplest for two key reasons I'll mention soon), partial derivatives $\partial_\mu$ are replaced with covariant derivatives $\nabla_\mu$ that do map tensors to tensors. For example, special relativity's electromagnetic $\partial_\mu F^{\mu\nu}=j^\nu$ matures to $\nabla_\mu F^{\mu\nu}=j^\nu$. The left-hand side can be written as $\partial_\mu F^{\mu\nu}+\Gamma_{\mu\rho}^\mu F^{\rho\nu}+\Gamma_{\mu\rho}^{\nu}F^{\mu\rho}$; the $\Gamma_{\alpha\beta}^\gamma$ are coefficients called Christoffel symbols, which characterize how spacetime geometry define the tensor-to-tensor differentiation. With this machinery in place, the laws become invariant under general coordinate transformations.
It's worth explaining in some detail how we then explain gravity, because it turns out GR is just one way, albeit an especially simple way, to simultaneously achieve the above trick and make geometry generate this fictitious force.
General relativity makes two assumptions that aren't strictly necessary for this to work, but they're the simplest special cases of more general options. (Physicists do the simplest thing compatible with the evidence.) One is to have zero torsion, meaning $\Gamma_{\alpha\beta}^\gamma=\Gamma_{\beta\alpha}^\gamma$. This assumption is enough to determine the symbols, viz. $\Gamma_{\alpha\beta}^\gamma=\tfrac12g^{\gamma\delta}(\partial_\alpha g_{\beta\delta}+\partial_\beta g_{\delta\alpha}-\partial_\delta g_{\alpha\beta})$. The other is to take an especially simple form for gravity's contribution to the physical action.
Unlike partial derivatives, covariant ones don't commute. Without torsion, $[\nabla_\alpha,\,\nabla_\beta]V_\gamma=R_{\alpha\beta\gamma\delta}V^\delta$ defines coefficients $R_{\alpha\beta\gamma\delta}$, known as the Riemann tensor. (With torsion, there'd also be a multiple of the vector's covariant derivative on the right-hand side.) Contracting the first and third indices forms the Ricci tensor $R_{\beta\delta}=R_{\alpha\beta\gamma\delta}g^{\alpha\gamma}$, and contracting the remaining indices gives the Ricci scalar $R=R_{\alpha\beta\gamma\delta}g^{\alpha\gamma}g^{\beta\delta}$. In general relativity, the cause of gravity is adding a multiple of $R$ to the scalar Lagrangian density. In theory, one could add something more complicated.
A: While it is only an analogy, because the maths are not the same, we can think of someone living very close to the North pole.
If he takes 2 arbitrary orthogonal axis, any straight line has a linear expression. The arbitrary axis can be rotated, and the coordinates are changed accordingly. This is analog to Minkowski spacetime in SR, and the rotation matrix analog to Lorentz transformations.
Or he can use polar coordinates with center in the pole. That is analog to an accelerated reference frame in SR, in the meaning that the equation for a straight line with the variable $r$ and $\theta$ are non-linear (as happens with $t$ and $h$ for an object falling inside an accelerated frame). However, the fact that we can shift from polar coordinates to cartesian coordinates is analog to change from an accelerated frame to the (Minkowskian) frame of the object in free fall. It is not a Lorentz transformation, the metric tensor changes, but it is nevertheless a relativistic change of coordinates.
Until now, we are in the SR realm. But if our trajectories are long enough and no more so close to the pole, the earth curvature must be taken in consideration. The closest to cartesian coordinates are the projections of maps in a plane surface, where distances and areas are inevitably distorted. Lines that are geodesics in the globe are not necessarily straight in this map. This is analog to a frame in an object in free fall but far from the earth surface. Other objects in free fall don't have the same velocity from its perspective, because the acceleration of gravity changes with the altitude. Even so, it is possible to change frames and coordinates according to the principle of relativity. The difference from SR is that none of them are Minkowskian.
A: In simple terms, you need to express math of general relativity in terms of geometric quantities which are (or at least can be) defined without any reference to coordinate system.
Take for example Newton law of gravity. You can either write it as
$$m\ddot{x} =  -G\frac{mM}{r^3}x$$
$$m\ddot{y} =  -G\frac{mM}{r^3}y$$
$$m\ddot{z} =  -G\frac{mM}{r^3}z$$
or in geometrical language
$$m\ddot{\vec{r}} =  -G\frac{mM}{r^3}\vec{r}.$$
The later formulation has the advantage of being coordinate independent, because the vector $\vec{r}$ is object that is well defined even if we have no coordinates whatsoever. Written like this, the law keeps its form under any coordinate transformation trivially.
The same happens in General relativity, only we use a little more complicated objects than vectors, like tensors, forms and so on.
But the thing is, you can almost always express any law in geometric language, so being able to show that laws of nature keep their form under coordinate transformation is strictly speaking meaningless.
Imagine the gravitational law in the form
$$m\ddot{x} =  -G\frac{mM}{r^3}x$$
$$m\ddot{y} =  -G\frac{mM}{r^3}$$
$$m\ddot{z} =  -G\frac{mM}{r^3}.$$
At first sight this might seem as coordinate dependent law. But you might rewrite it in geometric language as
$$m\ddot{\vec{r}} =  -G\frac{mM}{r^3}\left[\left(\vec{r}\cdot \vec{n}_x\right)\vec{n}_x+\vec{n}_y+\vec{n}_z\right],$$
where $\vec{n}_x,\vec{n}_y,\vec{n}_z$ are unit vectors in some preferred directions. This is defined abstractly without any reference to coordinate system whatsoever, and thus the form of the law is same in all coordinate systems. However, we do need to introduce special directions into our space.
So the true significance of being able to write law in coordinate-independent form is to be explicit in all the structures that are assumed to be in your space (or spacetime). This makes it easier to decide whether the law you came up with is sensible or not simply by looking if the structures it needs are reasonable. Without the coordinate-free form, you could fail to notice some structure you introduced that is not physically justified and that different direction of research is preferable.
In particular, you do not want any preferred directions in general relativity, so the law should not depend on any predefined vectors at the spacetime. This reduces the number of mathematical objects that you can use to write down your field equations.
