Why did Einstein get credit for formulating the theory of special relativity?
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$.
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.
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.