Why did Einstein get credit for formulating the theory of special relativity? See The Principle of Relativity here: The Principles of Mathematical Physics. This was written by Poincaré in 1904, a year before Einstein published his theory of relativity.
It appears from this and other writings of Poincaré that Poincaré discovered the theory of special relativity before Einstein. So why does Einstein get the credit?
 A: Poincare introduced in 1905 the spacetime geometry as we know it today. I say this because (1) he combined space and time into a 4-dimensional spacetime, (2) he defined the metric, now known as the Minkowski metric, (3) he formulated the Lorentz group (and not any Galilean group) as the symmetries of spacetime, (4) his relativity was a spacetime theory that was applicable to electromagnetism as well as any other forces, and (5) he proved that the electromagnetism equations were covariant with respect to the spacetime geometry. These 5 concepts form the core of what modern textbooks teach as relativistic geometry. Poincare had them all in 1905, and Einstein had none of them.
A: It is important to note that Poincaré did not have spacetime geometry before Minkowski because: A) he did not define it through non-galilean relativity, B) Poincaré did not express particle motion in terms of a worldline, or define proper time as a worldline parameter. So inasmuch as spacetime geometry includes worldlines and proper time, Poincaré did not discover spacetime geometry.
A: Poincaré was confused on several points. (See the discussion on Wikipedia regarding "mass energy equivalence".) He could never get the mechanical relations straight, since he could not figure out that $E=mc^2$. Einstein followed Poincaré closely in 1905, he was aware of Poincaré's work, but he derived the theory simply as a geometric symmetry, and made a complete system.
Einstein did share the credit with Lorentz and Poincaré for special relativity for a while, probably one reason his Nobel prize did not mention relativity. Pauli in the Encyclopædia Britannica article famously credits Einstein alone for formulating the relativity principle, as did Lorentz. Poincaré was less accomodating. He would say "Einstein just assumed that which we were all trying to prove" (namely the principle of relativity). (I could not find a reference for this, and I might be misquoting. It is important, because it shows whether Poincaré was still trying to get relativity from Maxwell's equations, rather than making a new postulate—I don't know.)
Special relativity was ripe for discovery in 1905, and Einstein wasn't the only one who could have done it, although he did do it best, and only he got the $E=mc^2$ without which nothing makes sense. Poincaré and Lorentz deserve at least 50% of the credit (as Einstein himself accepted), and Poincaré has most of the modern theory, so Einstein's sole completely original contribution is $E=mc^2$.
A: From what I've been told by my mentors there were a few things that happened.


*

*Poincare was extremely generous person, he routinely attributed his contributions to others left and right. For instance, he contributed the transformations to Lorentz, while Lorentz himself admitted he didn't do them in the form in which Poincare presented them, and didn't see their value at the time. That was one factor why Poincare did not insist on attribution to his work from Einsten.

*Einstein was told by his mentor Minkowsky about Poincare's work, which included pretty much everything on special and general relativity, including $mc^2$ which was derived by Poincare. Minkowsky was friends with Poincare, and theyt had a lot of private communication with stuff which was not published. Einstein took everything that Poincare did, and did not refer to him until way-way later, many years later. He then pretended that he forgot. Yes, of course. Rightfully, he did not get Nobel for relativity work, because at the time everyone knew what was going. Minkowsky spoke with Poincare on the subject, and the latter did not want to complain.

*There was some anymosity between German and French, and also physicists vs. mathematicians kind. So Planck and other German dudes kept promoting EInstein's work, and consistently ignored Poincare's. For instance, there are myths that somehow Poincare did not do general relativity (false), or that he wanted ether (false) etc. It sort of worked, the general population thinks Einstein did it all, but all physicist know that something's not right with this business.


You can find a few historical researches on the subject out there, like this one.  
A: To begin, let's start with a very apropos anecdote from Lorentz himself. At a conference on the Michelson–Morley experiment in 1927 at which Lorentz and Michelson were present, Michelson suggested that Lorentz was the initiator of the theory of relativity. Lorentz then replied: "I considered my time transformation only as a heuristic working hypothesis. So the theory of relativity is really solely Einstein's work. And there can be no doubt that he would have conceived it even if the work of all his predecessors in the theory of this field had not been done at all. His work is in this respect independent of the previous theories." Lorentz, replying to Michelson at the Solvay Conference.
Poincaré never fully understood the mechanical relations of the coordinate system; because of this, he never correctly derived E=Mc2. Einstein knew of some of Lorentz and Poincare's work - though it is clear he did not have access to all of their principal works. He began with a simple geometric symmetry operating on one, and only one, guiding postulate, and from there derived a complete system from first principles: the speed of light is invariant and is the same for all frames of reference.
In addition to Lorentz and Poincarém, Fitzgerald and Maxwell also deserve credit for their contributions as well. The great physicist Wolfgang Pauli, the great historian of science T.S. Kuhn, and even Lorentz himself, famously credit Einstein alone for formulating the relativity principle. Poincaré was less generous, but that is probably because he never fully understood Einsteinian relativity and was mired in the Galilean conception of relativity in which there is always a privileged frame of reference. Poincaré was still trying to get relativity from Maxwell's equations, rather than derive the coordinate systems from the invariance of light speed. This is a huge difference. See below.
Special relativity was being groomed for discovery in 1905, but it was Einstein, and Einstein alone, who derived a complete system from first principles (using one fundamental postulate) and only he correctly derived E=mc2 from said postulate. Without his derivation of E=Mc2, the system falls apart. Poincaré, Lorentz, Fitzgerald, and Maxwell deserve 50% of the credit (as Einstein himself accepted), but that's like splitting hairs and pointing out that Descartes and Fermat deserve 70% of the credit for calculus when Newton and Leibniz were the first to integrate the various derivations of analytical geometry.
Lorentz actually misinterpreted his own transformations as applying to the Ether (in fact I think he derived them purposely to describe how the ether "reacts" in such a way as to be in accord with experiments (Michelson-Morley). So Einstein gets credit for being the first to correctly interpret the equations and do away with the Ether concept. Both Poincare and Lorentz believed in the aether - a non-trivial fact - which represents a privileged frame of reference (Galilean relativity) as opposed to a coordinate system that has NO preferred reference frame (Einsteinian relativity).
Einstein derived E=MC2 from first principle, notably that energy carries inertia from emitter to absorber, and the resulting rest frame that the separation "mass" and "energy" entails. This derivation of E=mC2 as a consequence of special relativity is epistemically critical to Dirac's later reconciliation of special relativity and quantum mechanics.
Einstein had the correct electrodynamic transformations in 1905, and the correct energy density and momentum density expressions, and the right relation between mass and energy. Poincare had all but the last, and this got him confused on several important points. Poincaré did not have spacetime geometry before Minkowski because: A) he did not define it through non-galilean relativity, B) Poincaré did not express particle motion in terms of a worldline, or define proper time as a worldline parameter. So inasmuch as spacetime geometry includes worldlines and proper time, Poincaré did not discover spacetime geometry. Einstein's complete systemization of the Lorentz transformations and the second order transformations essentially wove space and time together in a way that is non-Galilean (Poincare never got that far). Minkowski, took Einstein's interval relation and mathematized it in 4-d vectors (but again, it was already implied in Einstein's 1905 paper).
To borrow from Ron Maimon and Jonathan Svarttorn's dialogue, Poincaré noted a preference against using Minkowski spacetime. Another curiosa, Moskowzki sat in the audience at his Berlin lecture where Poincaré had talked about Einstein's work both in the positive and negative. The speech-transcript does not include any explicit mention of Einstein by name though, so we are left to assume he did a bit of adlib when talking about Einstein specifically. From Moskowzkis impression, it seems Poincaré did indeed regard Einstein's work as not only different to his but... too revolutionary and daring. See link: http://mathpages.com/home/kmath630/kmath630.htm
Einstein argued that a light pulse which is spherical in one inertial frame, is spherical in every inertial frame. According to Poincaré, a light pulse that is spherical in the above mentioned privileged frame is an elongated ellipsoid in every other inertial frame. The difference in description is due to that fact that Einstein recognized the relativity of spatio-temporal coordinates, when Poincaré did not. And, the aberration constant, Poincaré didn't derive it, Einstein did.
Although Poincaré understood independently of Einstein how the Lorentz transformations give rise to non-Galilean transformation rules for velocities (indeed Poincaré derived the correct relativistic rules), it is clear that he did not have a full appreciation of the modern operational significance attached to coordinate transformations. He did not seem to understand the role played by the second-order terms in the transformation. Compared with the cases of Lorentz and Larmor, it is clear that Poincaré did not fully understand either length contraction or time dilation to be a consequence of the coordinate transformation. What Poincaré was holding out for was no less than a new theory of ether and matter - something far more far-fetched than what appeared in Einstein's 1905 relativity paper. Einstein's rejection of the aether is important, but is not the pivotal difference between his conception of relativity and Lorentz/Poincare conceptions. Why? Because it is always possible to add for whatever reason the notion of a privileged frame to special relativity, as long as one accepts that it will remain unobservable. However, in addition to the examples given above, there are other new features in Einstein's work:
*The full meaning of relativistic kinematics was simply not properly understood before Einstein. Nor was the 'theory of relativity' as Einstein articulated it in 1905 anticipated even in its programmatic form. It is impossible to understand the full implications of Einstein's discovery of special relativity without taking on board the impacts of the quantum in physics (see Paul Dirac). In respect to the conventional nature of distant simultaneity, Einstein was doing little more than expanding on a theme that Poincaré had already introduced. Where Einstein goes well beyond the great mathematician is in his treatment of the coordinate transformations. In particular, the extraction of the phenomena of length contraction and time dilation directly from the Lorentz transformations in section 4 of the 1905 paper is completely original. The genius of Einstein's 1905 paper is that the modern, dynamical interpretation of special relativity - as opposed to the kinematical approach of Einstein's 1905 paper - is ALREADY contained in Einstein's 1905-paper "masqueraded in the language of kinematics" (Physicist Harvey Brown) and the modern understanding of space-time.
You cannot formulate General Relativity using Poincare/Lorentz's conceptualization of relativity. You can, and Einstein did, using Einsteinian SR. Differences, for instance, in how one obtains the conservation of mass in GR vary widely depending on whether you use Einstein's approach or Poincare/Lorentz. I hope this settles the debate once and for all. Until his death, Poicare never fully grasped the full implications of what Einstein had done. Lorentz, a man Einstein called "the smartest man I have ever known," eventually came around to it once General Relativity proved so successful.
A: An historical confection reposted from MathOverflow … was young Albert Einstein a sci-fi reader? :)

I ran across the following (to me startling) example in Robert Cromie 1895 techno-thriller The Crack of Doom (reprinted in The End of the World: Classic Tales of Apocalyptic Science Fiction, Michael Kelehan, ed.)

Page 102:  "If you consult a common text-book on the physics of the aether, you will find that one grain of matter, contains sufficient energy, if etherised,  to raise a hundred thousand tons nearly two miles."

Here "grain" is a standard unit of jewelers (one gram = 15.4 grains).  Then it is easy to verify, that within ±2% error, Cromie's "etherised" mass-energy relation is $E = m c^2/2$.  
Einstein was 16 years old when Cromie's book appeared (published by a European publishing house) ... a very impressionable age, needless to say.  Yet despite the clue that Cromie so generously provided to science fiction fans in Europe, ten years passed before Einstein got the factor of two right! :)
A: I think the quote Maimon gives of Poincare, "Einstein just assumes that which we were all trying to prove." highlights exactly why Poincare did not discover anything like special relativity. Poincare was looking for a "mechanical" explanation of why the speed of light "appeared" constant in all reference frames. In other words, Poincare did not even believe in relativity in the Einsteinian sense. He believed that there was a preferred frame at a fundamental level. 
What Einstein did was to raise the "problem" of the speed of light appearing constant in all reference frames to the level of a postulate. This is what Poincare means when he says "Einstein just assumes that which we were all trying to prove". I think Poincare didn't really understand what Einstein had done -- space and time were fundamentally woven together in Einstein's theory. In Poincare-Lorentz's theory, space and time are separate, but only appear to be woven together -- there is a preferred frame where simultaneity of spacially separated events is absolute.  
I would also like to add -- and this part is just speculation -- that I believe we would still not have special relativity today if it hadn't been for Einstein. I believe we would still be working in the framework of Lorentz-Poincare, where Lorentz Invariance is achieved at an observational level, but fundamentally the theory has a preferred reference frame. 
