You really don't understand this do you?
Yes, there were religious texts that mentioned marriage. Religious texts mentioned quite a lot. And yes, the elite in society did indeed engage in religious marriage ceremonies. However, the problem comes when you look at the VAST majority of humanity, IE, the other 99%, you see that they simply didn't do these things. They didn't have the MONEY to put on lavish ceremony, or to hire priests, or etc. They could barely support THEMSELVES. Even by the 1800s, 50% or so of the population still did not do ceremonies as they could not afford it. It was only in recent times of the 1900s that religious marriage transfixed to all corners of society due to vast increases in wealth, the poor of today have access to FAR, FAR more goods, food, and items than even some of the rich did 200 years ago.
Also, you forget to note that it was also against religious AND civil marriage law to marry one of a different race. This was not changed until the mid 1900s in america. How do you qualify that? If you say that gay marriage should be banned due to 'long standing tradition', than that should apply to all marriage law, including not being allowed to marry a black to a white. If you say that 'Well, that's ok because that was about racism, and blacks and whites have no control over their colour', well then how is anti-gay marriage not simply homophobia, and gays/bis/lez don't have any more control over it than blacks, whites, asians, etc have over their skin colour.
In the end, you are trying to place a MORAL argument (Gays shouldn't marry) on a LEGAL argument (People who are gay should not, by law, be allowed to marry). That simply doesn't work. We do not live in a theocracy, no matter how much some people seem to like the idea. Religion is not a state sanctioned practice. What if I have a religion that believes that gay marriage should be allowed? How is that religion any less correct than your religion, IN the eyes of the constitution?
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof;
Therefore, that would be interfering with my FREE EXERCISE of my religion, AS WELL as the respecting the establishment of a law that originates from a religion.