In the 19th century, anti-Catholicism became tied to anti-immigration sentiments among both the American elite and American lower classes. Catholicism became tied to European immigrants (Irish and then Italian) who competed with „native“ Americans––a term they ironically used to describe themselves––for jobs. These Catholic immigrants had different customs than their Protestant „native“ neighbors, customs that the Protestant disapproved of; among these, drinking was worst. There was also a persistent and palpable fear that Catholics couldn‘t be trusted because of their allegiance to Rome. These fears carried on in America through the 1950s.
During the Cold War period, when Kennedy ran, there was still fear that, when push came to shove, Kennedy would defer to the Pope and not the Constitution or American people. He actually had to come out and say that he had his own mind, and was not at the mercy of the Pope. I couldn‘t find the stand-alone video of him saying this, but it‘s used in this short video: