I wonder if that’s because they, personally, can’t imagine falling in love with a member of the same sex, so they don’t think anyone else can either.
Or if it’s because they’ve been exposed since childhood to countless stories (movies, books, TV shows) where a boy and a girl fall in love and get married and live happily ever after, but none where a boy and a boy (or a girl and a girl) do.
(ETA: Though neither of these have much to do with religiosity.)
Believing in God per se has nothing to do with whether you accept gay marriage. (And you mention Christianity as well but Judaism and Islam also worship the Abrahamic God without believing that Jesus was of divine origin.) The people who oppose gay marriage point to passages in an ancient text written by men who did not understand any but the most mainstream and socially acceptable behaviors of their time, which was over a thousand years ago. And they believe those passages represent the true thoughts of their god even though the words were written by men. And they point to the passages that most strongly support their particular bias and ignore the ones that contradict it. And such has been the way of religion for eons. This is why homophobia, the Crusades, and mid-East terrorism all wear religious cloaks.