The currently accepted answer is a good one*. However, it leaves out one very important beef that the Republican Establishment had with Reagan: racial politics.
The Liberal wing of the Republican party was actually instrumental during the 50's and 60's in getting Civil Rights legislation passed. There was essentially a coalition of moderate Democrats and Liberal Republicans that pushed through things like the Voting Rights Act.
There was a large block of very conservative southern Democrats who were dead set against the entire Civil Rights package, and for every such bill there was an attempted filibuster in the Senate. Senator Sam Earvin (D-NC) made what became a typical argument that it violated the principle of States' Rights. In other words, States should have the right to oppress a certain class of their citizens if they so choose without interference from the Federal Government. This is how the "States' Rights" argument in that era became a proxy argument for the upholding of Jim Crow.
These bills eventually passed, of course, but the Southern conservative Democrats did not forget, and largely started to abandon the Democratic party in national elections. At first this took the form of third parties, exemplified by the States' Rights Democratic Party, which won 4 southern states in 1948.
This large electoral block of voters was ripe for the picking, if only the Republicans could reconcile themselves with the racist policy positions it would require to do so. The short story here is that the Liberal and Moderate Republican establishment was not up for that, but the Conservative wing was. Thus was born The Southern Strategy.
The name was first used with the Conservative-friendly Nixon administration, but the strategy itself was first employed by Ronald Reagan's mentor and idol, Barry Goldwater. He ran against the Civil Rights Act, using (as per form) the coded "States' Rights" argument. Goldwater lost badly, but he still won his home state, and swept the entire deep South.
As I said, Reagan was a supporter and admirer of Goldwater, and ran in 1976 and 1980 as the standard-bearer for the "Goldwater" faction of the party. Being from California he didn't have a huge track record on the racial issue though. So he made sure to shore up his cred in that area by actually opening his campaign by going all the way to Philidelphia, Mississippi, the site of the Mississippi Burning murders, and delivering a speech on "State's Rights".
This was obviously a bit of political gymnastics for the party that had initially freed the slaves, and created and nurtured the Constitutional Amendments that the various Civil Rights acts were trying to enforce. It also meant a loss of black support for the foreseeable future, as well as the entire liberal faction of the party. However, its really tough to argue against success, and the new party alignment certainly brought that.
* - I upvoted