One fruitful way to look at the politics of immigration, is from the perspective of a minority (or at least socio-economically subordinate), ethnically white culture in the United States that is trying to avoid dilution. This culture, which I call "Country-Western", is one that even people from this culture who make it into the ranks of the American economic elite often work hard to suppress.
Why do the people of immigrant filled New York City or Los Angeles not fear immigration, while excluding immigrants is highly salient in Alabama, where immigrant populations are scarce?
Perhaps, the answer is rooted in the inferrence that immigrants will assimilate into the dominant culture of the United States. If you are a native born member of the white middle class in New York City or Los Angeles, you can be relatively confident that immigrants are eager to assimilate into your culture. If you are a native born member of the white middle class in Alabama, you can be relatively confident that immigrants are not particularly eager to assimilate into your culture.
The drama of gay rights can been seen through the same prism. Because, "country-western" culture in the United States does not have much of a niche in which one can come out as gay, and because churches which are welcoming to people who are gay tend to have ties to the dominant rather than the "country-western" culture, acceptance of gay rights fuels a trickle of native born members of this white minority culture out of it and into the dominant American culture. It is no coincidence that states that allow gay marriage and/or civil unions are overwhelmingly Yankee or urban, and that states that take the half-step of domestic partnerships are overwhelming the Pacific States which have only a weak "country-western" cultural component, while those states where this cultural component is large tend to have state constitutional amendments prohibiting gay marriage.
This notion may even explain much of the anti-intellectualism that is rife in conservative white protestant political circles.
Thus, fear of immigration and gay rights and science may have much the same motive as the fear that Jewish parents have of intermarriage. The driving motivator may be a loss of cultural market share if immigration and gay rights are embraced. This impact, unlike the questionable economic impacts sometimes claimed in polite political debate, may help explain the persistance of these issues as high saliance issues despite an absence of tangible economic or liberty impact on people. The fear is dilution and marginalization of a white ethnic culture that is unable to absorb either.
A trickier issues is parsing what is going on in the Midwest, which is neither entirely Yankee or entirely Country-Western. Outside the highly urbanized Illinois and its neighbor Iowa, they have taken the Country-Western line on gay rights, but until recently haven't been particularly hostile to immigration. But, these states also seem to be swing states that are potentially on the brink of changing sides in the two party battle for the United States as they are depopulated or stagnant in population and the people with the strongest ties to the dominant American culture leave, while those with the strongest ties to Country-Western culture remain.
In contrast, as urban areas in the American Mountain West grow, the influence of rural areas and rural support oriented cities is declining and their political fates are increasingly aligning themselves with the compositions of the waves of migrants into their cities.