Well, being as none of us was there, the origin of marriage is purely speculative. Here's my speculation:
Marriage, or pairing one-on-one, arose in Mesopotamia, around the dawn of agriculture. Before that, sexual behavior was not connected with reproduction, and I can imagine the sexual behavior of pre-agricultural humans probably resembled several of the types of relationships we see among primate groups. What's the point in controlling sexual behavior, if it is not seen to have any consequences?
What was it about agriculture that changed this? Tilling fields, and other farming duties, required domestication of large animals. Domestication involves penning the animal up, and with the superior upper body strength of males, animal husbandry became the province of men. Surely, some started to notice that a female animal penned up without access to sex with a male animal of the same species was barren. Add a male, and you have offspring. Further, the offspring resembled the male that the female had sexual contact with. Long before genetics were understood, or even conceived of, early animal tenders discovered that in order to have the concept of "my child", a man had to have exclusive sexual contact with a woman. This became part of the tribe's "sacred knowledge", along with the calendars that told early farmers when to plant and when to harvest, and evolved into their religions.
Marriage has gone through many different forms in that time, within the framework of the one-man, one-woman mold, often allowing the old alpha male of the pre-agricultural time, now called the chieftain, or king, to have numerous other women for his exclusive sexual access, even though one woman's children had primacy, and were considered "legitimate" heirs to the chieftainship. Marriage used to be primarily a property transaction, with goods flowing to either the bride's or the groom's family, and the woman was just part of the transfer. We've evolved beyond that today, thankfully.
The present national debate about gay marriage has arisen because of medical technology. In agricultural times, each new child had not only a mouth to feed, but a pair of hands and legs to work the farm. Besides, many did not survive the hardships of disease, malnutrition, war, or weather. Hence, a society that had "be fruitful and multiply", rather than its opposite, was favored by the circumstances. Parents often didn't survive long enough to see even most of their grandchildren's generation being born. Further, we were finally able to separate heterosexual behavior from reproduction with the development of reliable means of contraception.
If there could be marriages that did not have children in them because the kids were all grown and gone (partly because there were less of them), and marriages where it might be explicitly planned that there be no offspring at all, then conferring marital benefits solely for the purpose of nurturing the next generation became less imperative. Add to the fact that at least lesbian couples can have children without the usual intervention by a male, and you have the heterosexual and homosexual couple not looking as different from one another in the days when procreation was the chief natural delimiter between them.
All the talk about "tradition" and what some dusty religious text says, in someone's interpretation, will not change the fact that there is a greater and greater tolerance of, and acceptance of homosexual people in our society. If anyone really wants to slow this trend, they're going to have to come up with some other reason, and I've just not seen one on the horizon.
The gay marrieds, as a class, will be able to litigate on equal protection grounds, to change aspects of the legal incidinces of marriage that don't appeal or apply to them. The family-strengthening aspects will wither away.
What did the interracial couples change? I guess one could argue that non-religious marriages increased the number of marriages that demanded no-fault divorce, but to people who are/were solidly committed to each other for reasons reflecting their religion are not really tempted by this. I suppose that if it's easy for a wife to divorce a man who would otherwise use the law to keep her bound in the marriage, to satisfy his religious obligations, he could be said to be damaged, but in that case, he doesn't want a wife, he wants a prisoner.