a) Goldwater, in part simply because he was in fact running against Johnson, was running against civil rights and civil rights activism. Not that he was George Wallace or Lester Maddox, but some said he could have done more to discourage that perception. At any rate, the only states to go Republican in 1964 other than his home state of Arizona were a band across the south: Louisiana, Mississippi, Alabama, Georgia, and South Carolina.
b) Four years later, in 1968, George Wallace ran as a third party candidate and won most of the same states. The only southern state to vote Democratic that year was Texas; the others that did not go for Wallace went with the Republican. The south was not happy with the Democratic party and were looking for alternatives, and the Republicans were courting them.
c) From the 70s through the 90s, the South became more and more difficult territory for Democrats, at least on a Federal level. (Many states remained Democratic in their statewide offices). Christian fundamentalists became politicized in a very big way beginning in the late 70s and the Republicans courted them: opposition to feminism, abortion, sex education aside from abstinence, complaining about ‘secularism’ and portraying Christianity as beleaguered and harassed by liberals in government, opposition to the tolerance of gays and gay rights, and trying to reinsert religion into public schools netted them a lot of votes. They campaigned talking of “morals” and “family values”, and people in the south voted them into office and asked for a Bible-based Christian government, and this became the “base” of hard-core Republican voters, to the point that the party, when it had to make choices, came to be more loyal to those issues than to the economic conservatism that the party had been associated with in previous decades.
Even moderate Democratic candidates from Southern states found it difficult to harvest votes from the south. Clinton’s east coast losses were all in the south in '92 and '96 except for Indiana, and Gore lost all of the south in 2000 (famously and disputably close in Florida but not elsewhere) and Kerry did likewise in '04.