The civil rights movement.
Look up "Solid South" on wikipedia.
The deep south is very racist and very Christian. Always has been, always will be, no sense in trying to explain it.
The Democratic Party used to be the Southern racist party. They won by huge margins in every election for almost a century because of their racist policies.
Starting in the 1950's, the Democrats began to support civil rights. By this time, the modern divisions of Dems being pro-labor and Repubs being pro-business had emerged. Since the Dems were supposedly the people's party, they needed to be nicer to the people.
This didn't go over well in the South, and they revolted. They even tried to form their own parties to replace the Democrats, mixing liberal economic views with conservative social policies. They didn't work.
The 1964 and 1968 elections changed everything. Barry Goldwater, religious reactionary, ran on the Republican ticket against LBJ in 64 and got killed everywhere but the South. In 1968, Richard Nixon saw that trend and decided to openly target the Southerners. His "Southern Strategy" saw him essentially embrace religion and racism (two things he really wasn't passionate about) to get votes. It worked.
Also, things have changed a lot since the 1960's and most of the Western world has realized that a literal interpretation of the Bible is silly and outdated. But southern and western US is the one shining exception to that. They have become downright militant with their religious views. So they are the Republican party's base.