Sure, the mechanics of how things become "law" is complicated by the fact that you can have actual laws, constitutional amendments, supreme court decisions, etc, depending on the exact thing being discussed and where responsibility for it rests in the various levels of government in the US.
But no matter how you slice it, I see no obvious support in the data for the original claim that "gay marriage was legalized when popular support was only at 25%".
Now maybe there were some states that had support at only 25% in 2015. For example, https://www.nbcnews.com/news/us-news/where-same-sex-marriage... is a 2014 article that mentions that Missisipi had 14% support in 2004 and support went up by "1-2% per year since then". So _maybe_ it was at only 25%, as an absolute lower bound. But chances are it was higher than that even there.
But no matter how you slice it, I see no obvious support in the data for the original claim that "gay marriage was legalized when popular support was only at 25%".
Now maybe there were some states that had support at only 25% in 2015. For example, https://www.nbcnews.com/news/us-news/where-same-sex-marriage... is a 2014 article that mentions that Missisipi had 14% support in 2004 and support went up by "1-2% per year since then". So _maybe_ it was at only 25%, as an absolute lower bound. But chances are it was higher than that even there.