He also had FDR, Jr. campaigning for him in WV - a big help in that state.
http://www.gwu.edu/~erpapers/mep/displaydoc.cfm?docid=erps-wvp60In 1958, when Kennedy had commissioned Louis Harris to poll West Virginia voters to see how he would fare running against Richard Nixon, he led his Republican opponent by fourteen points. Cheered by this hypothetical victory, he set up what journalist Theodore White called "a shadow operation" which, by 1959, had chairs in each county. Harris then polled West Virginia Democrats and reported that JFK led Humphrey seventy percent to thirty percent. Kennedy then decided that he had the votes he needed to carry the state and would not campaign actively there unless Humphrey entered the primary. Humphrey had made an early decision to compete with Kennedy for West Virginia, believing that his populist Midwestern background would appeal to voters in that state far more than JFK's polished Ivy League image. Although Humphrey had recently lost the Wisconsin primary, his prospects in West Virginia looked promising. At the same time, the Kennedy team remained confident that their candidate would trounce Humphrey, who could not even carry his next door state.
By early spring, the issue of Kennedy's religion had entered the electoral discussion, splitting the Wisconsin vote along religious lines and resulting in a steady erosion of support in West Virginia. Four weeks before West Virginia primary day, the tide had turned against JFK and he found himself trailing Humphrey by 20 points. When the campaign asked the county chairs why the voters had switched allegiance, they replied, "No one know you were a Catholic" when the poll was taken. Kennedy responded by moving his key campaign aides to West Virginia, calling on close friends to volunteer their time, and training county campaign chairs in 39 of the state's 59 counties to staff phone banks, host receptions, and go door to door to distribute literature. He changed his schedule to campaign throughout the state and brought Franklin D. Roosevelt, Jr. there to endorse his candidacy. On April 25th he decided to attack the anti-Catholic bias head-on, telling audiences across the state, "I refuse to believe that I was denied the right to be President the day that I was baptized." Finally, on May 8th, two days before the election, in a broadcast paid for by the campaign, FDR, Jr. asked JFK how his Catholicism would effect his presidency. Kennedy replied that taking the oath of office required swearing on the Bible that the president would defend separation of church and state and that any candidate that violated this oath not only violated the Constitution but "sinned against God."