There is a fascinating article in the Los Angeles Times about the origins of modern American conservatism, IE, post-World War II conservatism. The article points out that the father of modern conservatism isn't Barry Goldwater, but Joe McCarthy. He was the politician who figured out that what Republicans needed to do was to demonize certain Americans to convince other Americans to vote for them.
Joe McCarthy went after Democrats by saying that they were soft on communism and tolerated communists in the government. He picked up support from working-class Catholics, rural whites, and Southerners. Nixon was able to follow the same strategy by demonizing college students, African-Americans, and anti-war protesters. Bush followed the same strategy in accusing John Kerry of not supporting American troops and implied that anyone who disagreed with him in how he was conducting the Iraq War was Un-American.
McCain tried the same approach against Obama, but the bad economic news meant that people were more worried about their jobs than their neighbors' patriotism. Don't worry, though, as the author of the Times article puts it, Republicans won't give this tactic up because it is in their DNA.