And I'm not sure it's totally accurate to say that what happened was people coming around to "lefty liberalism." The nature of the debate changed quite significantly after 2005. First, it became clear to the public that sexual orientation was an immutable characteristic. When I was growing up in the 1990s, it was still common to hear it called a "lifestyle" implying it was a choice. Second, there was an increased focus on equal legal rights for committed same-sex couples. Appealing to neutral application of universal legal principles is usually a compelling message for even non-lefty Americans. Around the same time as Prop 8 was passed, a state Supreme Court decision legalized same-sex marriage in Iowa. Iowans aren't particularly lefty, but a slim plurality supported the decision within a year or two. Third, in the same timeframe a number of mainline Protestant churches began ordaining gay clergy. While the political influence of these denominations is less than in the past, they’re still a powerful force in the center of the political spectrum among middle age and older Americans.
The end result of all that was Obergefell which wasn't particularly lefty or liberal. Justice Kennedy's opinion was a paean to marriage as an ancient and essential social institution. Because marriage was fundamental, participation in it could not be denied to same-sex couples just because of the programming they were born with.
Of course, none of this would've happened without decades of tireless "lefty liberal" advocacy. But public opinion changed dramatically within a single decade, and wasn't accompanied a similarly large leftward shift in peoples' politics generally. So it's interesting to think about what drove those changes.
In the early 2000s, some famous people (TV anchors, etc.) came out of the closet. In 2005, gay marriage was approved, with some controversy but according to polls 65% of the population supported it at the time. 3 or 4 years later, only a minority of extremists remained opposing it, so even the main (and in that time, practically the only) national right-wing party stops actively opposing it.
It's curious because I don't think the change was driven by any obvious big movement or campaign with media attention (analogous to, say, BLM, or in the Spanish context, the 15-M movement). Maybe I wasn't paying a lot of attention to the issue, but it seems like most people just kind of spontaneously decided that hating on gay people was stupid.
I guess secularization probably helped (2000 was also the year where a fast downward trend started in statistics like religious marriages vs. civil marriages) but it's at most a partial explanation. Most religious people now don't object to gay people getting civil marriages either.
PS: This is not to discredit the Spanish gay movements and the people who tirelessly fought for their rights, it's just that my impression is that they weren't on the news that much so most people weren't convinced directly by any specific movement. Plus, gay rights movements in Spain existed at least since the end of the Franco dictatorship but it seems that it wasn't until the early 2000s that there was the sudden change I'm mentioning, it wasn't a slow and constant change.
I think it goes to show that conservatives can generally rely on younger generations becoming more receptive to their arguments about tax and security and Chesterton's Fence (and less interested in provisions for people on low incomes) as they age to compensate for older conservatives dying off, the switching sides in culture wars tends to trend in the opposite direction.