Note that "the priesthood" is considered a requirement for salvation, so denying blacks the priesthood was quite significant. Various LDS sources seem to disagree as to why this is; Joseph Fielding Smith (10th LDS prophet, 1970-72) claimed it's because blacks didn't fight on God's side in a war during the pre-mortal existence, while Gordon B. Hinkley (15th LDS prophet, 1995-2008) simply says "I don't know".
The official position of the LDS church now is that blacks are fully equal to whites: "Forget everything that I have said, or what President Brigham Young or President George Q. Cannon or whomsoever has said in days past that is contrary to the present revelation. We spoke with a limited understanding and without the light and knowledge that now has come into the world. We get our truth and our light line upon line and precept upon precept. We have now had added a new flood of intelligence and light on this particular subject, and it erases all the darkness and all the views and all the thoughts of the past. They don't matter any more." (Bruce R. McConkie, member of the Quorum of the Twelve -- basically, the lesser prophets one step below the top guy. 1978.) When he says "forget all I said" he's referring to his 1958 comments affirming the view that blacks were less valiant in the pre-mortal war [0].
You can read more at http://en.wikipedia.org/wiki/Black_people_and_Mormonism . You can find lds rationalizations at http://www.fairlds.org/fair-conferences/2002-fair-conference... .
EDIT: to be totally fair, despite institutionalized LDS racism, they were strongly anti-slavery in the early years; LDS founder Joseph Smith ran for president as an abolitionist in 1850.
[0] http://en.wikipedia.org/wiki/Bruce_R._McConkie#Controversy