Though they are the same price, they are not directly comparable.
The closest Nikon, feature and performance wise, would be the D90. Actually that's not quite accurate either.
The Canon T3i is Canon's top-of-the-line, entry-level Rebel camera. Nikon's top-of-the-line, entry-level camera is the D7000. But the D7000 is not only more expensive than the T3i, performance wise it's actually in a class well above the T3i.
As it is the D5100 is so new it hasn't been independently tested yet. However, if we compare what it replaces, the D5000, with the T3i we find the discontinued D5000 out performed the T3i image quality wise
DxOMark - Compare sensors.
So it reasonable to expect the D5100, with all it's improvements pover the D5000, to make that disparity in image quality even greater.
In short, I would recommend the D5100 over the T3i, if image quality is a camera peformance consideration you have.