Since the great majority of people who are against gay marriage are Christians (at least, in western society), I will be focusing on them.
I think it's okay for Christians to say they don't want gay marriage to be legalised. It's just part of their religion, most would agree. But I think enforcing their laws upon people who don't want to have anything to do with Christianity is not okay. This is happening on a large scale in America, where the church and the state aren't seperated. They're supposed to be seperated but they aren't. This is the reason America is the only country in western society where gay marriage is for the most part not allowed. Except for Italy, which is also extremely Christian.
It seems whenever religion has a substantial influence on politics, humans rights go out the window because the religion tells people how to think. This was demonstrated in the middle ages when the pope had absolute control over Europe (crusades, missionaries in Africa, conquest of the Americas, Pope Innocence 3 etc.). Whenever a religious leader is in control, they tend to force people to abide by the laws of their religion. You could say the phrase "Power corrupts" certainly applies to religious leaders.
However, I'm not saying Christianity is the only religion guilty of this, certainly not. The Islam is much worse. That's an interesting fact, because in the Middle-East religion and politics are one, completely unseperated. Leaders of the Islam even think that seperation of church and state is "a rebellion against God's law".
Another interesting point is that Hinduism and Buddhism have never forced their laws upon people, even though they have been in complete control over their countries for over 3000 years. So you could also say that there's something in Christianity and the Islam that causes their leaders to force their laws upon the population. But this is an entirely different debate.
In short, I think the only way to get gay marriage legalised is to seperate the church and the state more. I say more, because they can never be completely seperate. Doing this will be very hard if not impossible though, because religious followers and leaders will be reluctant to give up their power.