Did Hilbert publish general relativity field equation before Einstein?
On November 25, nearly ten years after the foundation of special relativity, Einstein submitted his paper The Field Equations of Gravitation for publication, which gave the correct field equations for the theory of general relativity (or general relativity for short). Actually, the German mathematician David Hilbert submitted an article containing the correct field equations for general relativity five days before Einstein. Hilbert never claimed priority for this theory. [Bold mine.]
Edit 1. But...
Many have claimed that in 1915 Hilbert discovered the correct field equations for general relativity before Einstein but never claimed priority. The article  however, shows that this view is in error. In this paper the authors show convincingly that Hilbert submitted his article on 20 November 1915, five days before Einstein submitted his article containing the correct field equations. Einstein's article appeared on 2 December 1915 but the proofs of Hilbert's paper (dated 6 December 1915) do not contain the field equations.
As the authors of  write:-
In the printed version of his paper, Hilbert added a reference to Einstein's conclusive paper and a concession to the latter's priority: "The differential equations of gravitation that result are, as it seems to me, in agreement with the magnificent theory of general relativity established by Einstein in his later papers". If Hilbert had only altered the dateline to read "submitted on 20 November 1915, revised on [any date after 2 December 1915, the date of Einstein's conclusive paper]," no later priority question would have arisen.
Edit 2. Haha, butbut... :)
Edit 3. Roundup.
Recent controversy, raised by a much publicized 1997 reading of Hilbert's proof-sheets of his article of November 1915, is also discussed [on pp. 11-13; presumed included in this answer].
Einstein and Hilbert had the moral strength and wisdom - after a month of intense competition, from which, in a final account, everybody (including science itself) profited - to avoid a lifelong priority dispute (something in which Leibniz and Newton failed). It would be a shame to subsequent generations of scientists and historians of science to try to undo their achievement.
The accepted answer by Keep these mind is thorough (+1 :-), and the answer to your question is probably "yes". However I would add that Hilbert acknowledged that he had merely added the last step to a long process and therefore that he had no claim to have invented General Relativity.
It's tempting to think of GR being revealed to the world in a single stunning paper, but this isn't the way it happened. Hilbert was only able to write down the correct action because of the previous publications by Einstein on his work leading up to that point.
There is no giant controversy about who discovered what first, and we don't know anything about who wrote what -- maybe Einstein broke his arm and forced someone else to write for him, I don't know. What we can talk about is their discovery of the relevant laws or the insights leading to the relevant laws.
The difference between Einstein and Hilbert is in their choice of axiom. This is akin to Einstein vs. Minkowski on the formulation of special relativity, for instance -- there is no doubt that Einstein first wrote his field equation, you can see this in "On the foundation of the General theory of relativity", but Hilbert first discovered the Einstein-Hilbert action, which is the more elegant formulation of the theory, because it directly states the link between curvature and gravity in a simple way, in terms of the latter's Lagrangian.
People are still asking this? This is revisionist nonsense. Hilbert did NOT publish the correct field equations before Einstein. Research done between 97 and 2002 discovered that field equations published by Hilbert were NOT generally co-variant, Einstein's were. (Ironically it was Einstein who pointed this mathematical fact out to Hilbert - arguably one the top 3 most gifted mathematicians of all-time).
Moreover, if you read the letters between Einstein and Levi-Civita, it is very apparent that it was Einstein who had done most of the mathematical and conceptual work for GR. It was Einstein that had tutored Hilbert - who had invited Einstein to perform a series of lectures in Gottingen on GR in 1913 and 1914. And Einstein, after publishing his failed Entwurf theory (which was a necessary step in clarifying which tensors held primacy), actually wrote down the correct field equations in a previous paper he had discarded in 1914 but returned to once he discovered Hilbert was on his ass. Without Einstein's papers published in 12 through 14 Hilbert doesn't even stand a chance at coming up with the proper FE.
Remember, the most difficult element of GR wasn't the differential equations, it was the translation of very, very difficult kinematic concepts into mathematics. This is why many physicists-cum-historians tend to say that it may have taken another 100 years to discover General Relativity had Einstein never came along. GR is laden with very subtle but highly complex conceptual nuances that defy easy explanation.