Pamela S. Karlan uses the example of Loving v. Virginia, on interracial marriage, to argue that marriage equality won't necessarily be decided in the Supreme Court:
Loving was the end point of a sustained assault on racial discrimination, and most of the troops in that campaign were not Supreme Court justices. … By the time the Court decided Loving, the vast majority of states had already repealed laws forbidding interracial marriage. Loving was decided a generation after the California Supreme Court, in Perez v. Sharpe, had used the Fourteenth Amendment to strike down California’s ban on interracial marriage. (In contrast to the California Court, the U.S. Supreme Court disingenuously dodged the marriage issue for a decade, apparently because it feared that a decision striking down bans on interracial marriage would imperil support for Brown.)
Rather than anticipating progressive social change, the Supreme Court most often reflects it.
This seems to me particularly true when the premise of certain arrangements genuinely shifts in the public consciousness. Once homosexuals became defined as people with a certain core identity rather than as people with a propensity for certain acts, a whole series of logical steps followed. My own view is that the law has largely followed this shift in underlying attitudes, and these attitudes have primarily changed simply because more straight people know more gay people. And unlike racial minorities, many of these gay people were those already known and embedded in existing families, communities and churches. How, one wonders, do fundamentalists really keep insisting that gay kids in their own churches and colleges are less aware of who they actually are than their preachers and politicians?
In one of the most tragic ironies in recent social history, this greater knowledge of gay people was accelerated by the AIDS epidemic. Our deaths remade our lives. I wonder if, without such a catastrophe – three times as many young Americans died of AIDS than died in Vietnam over a similar period of time – we would still be decades behind where we are.