Einstein's biographer Albrecht Folsing explained: Einstein presented his field equations on November 25, 1915, but six days earlier, on November 20, Hilbert had derived the identical field equations for which Einstein had been searching such a long time. On November 18 Hilbert had sent Einstein a letter with a certain draft, and Folsing asked about this possible draft: "Could Einstein, casting his eye over this paper, have discovered the term which was still lacking in his own equations, and thus 'nostrified' Hilbert?" Historical evidence support a scenario according to which Einstein discovered his final field equations by "casting his eye over" his own previous works. ... Findings of other historians seem to support the scenario according to which Einstein did not "nostrify" Hilbert.She favors Einstein, while others say Hilbert got the equations first. The debate is a little heated, with some historians being accused of tampering with the evidence to make Einstein look good.
I do not know who got the field equations first, but in my view it does not matter.
The equations are fairly simple, once you have all the mathematical machinery. Three formulations suitable for the solar system were found in 1915. They are (1) Lagrangian is scalar curvature; (2) Ricci tensor is zero; and (3) Schwarzschild metric.
Einstein would have had (2) in 1913, if he listened to Grossmann's argument for covariant equations. Levi-Civita told him the same thing in private correspondence. Hilbert told him the same thing in 1915. Instead Einstein wrote a paper in 1914 against using covariant equations.
Item (2) is commonly called the "field equations". People act as if this were a big deal, but the conceptually hard part was understanding that the Ricci tensor is the covariant measure of a gravitational source, and that a relativistic theory needs a covariant tensor. Deciding that the Ricci tensor is zero in empty space is the easy part.
It seems to be generally acknowledged that Grossmann, Levi-Civita, and Hilbert all helped Einstein understand that hard part, as he had no understanding of tensors and was busy writing papers on why covariance was wrong.
Hilbert first published (1), and Schwarzschild did (3). Either of these would have been sufficient to be called general relativity.
I don't know if there is any way to say who first had the crucial idea. Others also published research along these lines, such as Nordström's theory of gravitation in 1912 and 1913. In retrospect, general relativity is the logical consequence of special relativity, Riemannian geometry, and gravity.
Einstein got a lot of help from others, but he avoided crediting anyone. All his life, he avoided giving credit, unless he was forced. His most famous papers do not even have any references. There is more info at Relativity priority dispute.
If you want to dig into Einstein's paper, more are now online:
Starting on Friday, when Digital Einstein is introduced, anyone with an Internet connection will be able to share in the letters, papers, postcards, notebooks and diaries that Einstein left scattered in Princeton and in other archives, attics and shoeboxes around the world when he died in 1955.I don't think that any special new general relativity insights will turn up.
The Einstein Papers Project, currently edited by Diana Kormos-Buchwald, a professor of physics and the history of science at the California Institute of Technology, has already published 13 volumes in print out of a projected 30.
The published volumes contain about 5,000 documents that bring Einstein’s story up to 1923, when he turned 44, in ever-thicker, black-jacketed, hard-bound books, dense with essays, footnotes and annotations detailing the political, personal and cultural life of the day. A separate set of white paperback volumes contains English translations. Digitized versions of many of Einstein’s papers and letters have been available on the Einstein Archives of the Hebrew University.