Nope. It was a policy, AFAIK derived from custom that got started sometime during the pioneer era (and perhaps we should note, during a period when the Mormons were living in Missouri, a pro-slavery state, and were generally hated by Missourians partly because they were anti-slavery and a large voting bloc. Some think it got started partly as a way to keep heads down, out of the way of the violent mobs.). You will not find scripture that says blacks cannot hold the priesthood. As far as I have ever been able to figure out, no one knows exactly how or why the policy was started. For myself, I suspect it solidified into policy over time.
True, Brigham Young and others made statements about the ‘mark of Cain,’ ‘Hamitic race’ and so on. That also was never considered either revelation or scripture; like just about everyone in the mid-19th century, many Mormons assumed that blacks were a different race. As I understand it, the whole Hamitic thing was widely believed in the US as Biblical history–it was not a specifically LDS belief, but part of everyone’s cultural knowledge. It stayed for a while.
Starting in the 60’s, church leaders were known to be unhappy about the policy and hoping for it to change, but it was felt that such a change would require revelation. There was an official statement supporting the civil rights movement and asking LDS members to pray for the priesthood to be extended to all worthy males. That request was reiterated every once in a while. Harold B. Lee in particular, who served as President of the LDS Church in 1972-73, was very concerned about the issue. By 1978, when (as LDS believe, obviously others won’t) permission was finally granted, most Church members were extremely relieved and happy; I’ve heard people tell stories of how overcome with joy they were (I myself was five). The ones who weren’t mostly left the Church, and good riddance, or learned to get along.
Now, it’s true that there was a folk doctrine floating around that blacks had somehow been ‘less valiant’ or something before birth. Since that was never doctrine, the Church leaders apparently feel that to officially repudiate it would be to insinuate that was doctrine before, and it wasn’t. I think this particular speculation came about for a couple of reasons: One, Mormons hate not knowing why, and sometimes they make up explanations, known as folk doctrine. These explanations are frequently spectacularly wrong, as we see here. Two, we also like things to be fair, and this policy was clearly, to American Mormons in the 50’s-70’s, not fair. So, went the reasoning, there must be some reason for the unfairness that in fact makes it fair. Such a reason could only have happened before birth. Thus, in a desire to make the world fair, someone made up one of the most incredibly racist theories possible. Such are the dangers of speculation in an absence of information.
Nowadays, the LDS Church officially makes a big effort to include all races. In Feb. of this year, the Washington DC temple’s visitors’ center hosted its annual exhibit on black history. The second African temple just opened in Accra, Ghana (Temple photo tour, “Day of celebration” photo essay).