Actually, you're all off the mark. It wasn't welfare. Yes, black voters shifted towards the Democrats during the New Deal, but many shifted right back when it became apparent that the Roosevelt New Deal didn't, according to many Democrats in power at the time, apply to blacks.
You all need to remember that VAST numbers of white Republican diehards became hard-core Democrats in the 1930s, and stayed that way for the rest of their lives because they lost faith in the ability of Republicans to do anything other than attempt to maintain the status quo, and perceived that the Republicans in the 1930s couldn't even do that.
Many blacks also became very disillusioned with Roosevelt in that despite repeated pressure he wouldn't integrate the armed forces during World War II. Harry Truman did that in 1948, which helped his support and brought some support to Democrats.
The groundshift of black support to the Democratic Party came in late 1950s and early 1960s.
At the time the civil rights movement was gaining steam, and Martin Luther King was coming to prominence.
During the 1960 campaign MLK was actively courting both Nixon and Kennedy on the civil rights issue.
Kennedy met with King, and laid out his vision for what would eventually become the civil rights act of 1964.
Nixon, on the other hand, didn't even acknowledge King.
That was a big slap in the face for many blacks who had always counted on the Republican party as "their" party. In 1960s the number of black voters supporting Republican candidates fell dramatically, and Kennedy got unprecedented numbers of black votes.
After Kennedy's death, LBJ became the champion for many of his programs, including civil rights. He pushed civil rights FAR harder than Kennedy did (Kennedy was still trying to court the Southern anti-civil rights Democrat power brokers, men like Strom Thurmond, James Eastland, and Howard Smith[who tried to kill the bill by keeping it in committee] and others). LBJ used Kennedy's death to essentially ramrod the bill through both houses of Congress in June 1964. Interestingly enough, LBJ counted on the support of a number of prominent Republicans to help end Democrat fillibusters (Robert Byrd spoke for something like 18 hours straight) in the Senate.
While many Republicans supported the bill, their support was seen by many blacks to be weak and vacillating, and a number of prominent Republicans never really addressed the bill at all. And, while Republicans supported the legislation in far greater percentages than Democrats, it was still seen to be a bill of the Democratic party.
That set the stage for the 1964 election.
In 1956 Eisenhower had gotten nearly 40% of the black vote, in 1960 Nixon got 32% of the black vote, but in 1964? Goldwater got BARELY 6% of the black vote.
Over the next several years a number of prominent Democrats who had vehemently opposed the Civil Rights Act of 1964 switched to the Republican Party. Thurmond switched parties not long after the Civil Rights Act passed.
That was, in many ways, a PR nightmare for the Republicans, and helped cement in many blacks' minds that the Democratic Party was the party to support.
Yes, the Great Society block of legislation (aka the "War on Poverty) much of which also was passed in the summer of 1964, also contributed to black support for the Democratic Party, but just how much it swung black votes to the Democratic Party is pretty hotly debated. Most historians contribute Kennedy's introduction of, and LBJ's dogged support of, the Civil Rights Act as the watershed moment in bringing blacks into the Democratic fold.
I find it to be somewhat troubling to see so many people blithly say "Oh, all it took was giving blacks free money and they would come in droves." I've always been troubled by that, because it simply doesn't stand up to the facts of what really happened, and it, in many ways, simply forwards the stereotype that most blacks are lazy, shiftless, and looking for a handout, comfortable shoes, and a tight pussy, as one Democratic legislator so crudely put it in the 1950s.