Yes, certainly. The only reason we even have an inclination to label things as "right" or "wrong" is because of our first-hand knowlege of happiness and sadness, and our longing for the former, and our fear of the latter. And so I think it's quite clear that our only possible barometer on right and wrong is whether it results in happiness or sadness.
I hope that makes sense to you if you think about it.
Bans on gay marriage were based on idiosyncratic / ancestral / tribal beliefs about "god's will" or "natural order". They weren't grounded in it's effect on individual happiness, and were therefore baseless.