Last Friday the U.S. Supreme Court agreed for the first time to take on the issue of gay marriage. No matter how it rules in the two cases it will hear next spring, polling data suggest it is only a matter of time before legal recognition of same-sex unions is the norm throughout the country.

Something similar is happening with marijuana, which became legal in Washington last week and in Colorado on Monday. With both pot and gay marriage, familiarity is breeding tolerance.

The cases before the Supreme Court deal with popular reactions against gay marriage: the Defense of Marriage Act (DOMA), a 1996 law that barred the federal government from recognizing state-licensed gay marriages, and Proposition 8, a 2008 ballot initiative that amended California's Constitution to eliminate same-sex couples' right to marry, which the California Supreme Court had recognized that year. But something interesting happened after those measures passed: Surveys now indicate that most Americans support gay marriage.

The turnaround was remarkably fast. A 1996 Gallup poll found that 27 percent of Americans thought same-sex marriages should be "recognized by the law as valid, with the same rights as traditional marriages"; by last year that number had nearly doubled. Recent surveys by ABC, CBS, NBC, and CNN also put support for gay marriage above 50 percent.

Striking generational differences mean these numbers will continue to rise. In a CBS News poll last month, 72 percent of 18-to-29-year-olds supported gay marriage, compared to 53 percent of 30-to-44-year-olds, 44 percent of 45-to-64-year-olds, and 33 percent of respondents who were 65 or older.

The consequences of these changing attitudes could be seen in last month's election results. For the first time ever, gay marriage was legalized by popular referendum—not in one state but in three: Maine, Maryland, and Washington. Voters in a fourth state, Minnesota, rejected an initiative that would have amended the state constitution to prohibit gay marriage (which is already banned there by statute).

On the same day, voters in Colorado and Washington approved ballot measures aimed at legalizing the cultivation, possession, and sale of marijuana for recreational use. The initiatives won by surprisingly healthy margins of about 10 points in both states, in contrast with a California legalization measure that lost by seven points two years ago.

Nationwide support for marijuana legalization, like nationwide support for gay marriage, has increased dramatically, although not quite as swiftly, rising from 12 percent in a 1969 Gallup poll to a record 50 percent last year. While support for legalization dipped a bit during the anti-pot backlash of the Just Say No era, it began rising again in the 1990s. Public Policy Polling recently put it at 58 percent, the highest level ever recorded.

With pot as with gay marriage, there are clear age-related differences, reflecting different levels of experience with marijuana. In the CBS News survey, support for legalization was 54 percent among 18-to-29-year-olds, 53 percent among 30-to-44-year-olds, 46 percent among 45-to-64-year-olds, and 30 percent among respondents of retirement age.

Just as an individual's attitude toward gay people depends to a large extent on how many he knows (or, more to the point, realizes he knows), his attitude toward pot smokers (in particular, his opinion about whether they should be treated like criminals) is apt to be influenced by his personal experience with them. Americans younger than 65, even if they have never smoked pot, probably know people who have, and that kind of firsthand knowledge provides an important reality check on the government's anti-pot propaganda.

Another clear pattern in both of these areas: Republicans are much more likely than Democrats to oppose legalizing gay marriage and marijuana. Yet Republicans are also more likely to oppose federal interference with state policy choices. In light of DOMA's disregard for state marriage laws and the Obama administration's threats to prevent Colorado and Washington from allowing marijuana sales, now is put-up-or-shut-up time for the GOP's avowed federalists.