If you pause to think about it, gay rights are suddenly ascendant. Gay marriage is now legal in 17 states and the District of Columbia, and widely supported in public opinion polling. On Friday, a federal judge (a Reagan appointee, no less) joined a growing band of federal judges ruling for gay marriage when he threw out Michigan’s ban on gay marriage (although his ruling is now on temporary hold). And let’s not forget the U.S. Supreme Court ruled last June that married gay couples are entitled to federal benefits so as not to “disparage and injure” them and “humiliate” their children.

And it’s not just gay marriage. Joining the gay rights bandwagon are major American business leaders, who recently forced Arizona’s Republican Gov. Jan Brewer to veto state legislation that would have allowed business owners to deny service to gay citizens on religious grounds.

How did business leaders and Republican federal judges come to decide that discriminating against gays is no longer good business? Not so long ago, American society was unwelcoming and punitive. Gays went to great length to hide their sexual orientation, and those who were discovered were usually fired, expelled from the military and, often, lost family and community support.

Two factors seem to have caused the shift in public opinion: The purposeful effort by gay leaders in the 1970s and 1980s to urge gays and lesbians to “come out,” and the decision a decade ago by a handful of gay leaders to re-frame the gay marriage issue.

In 1979, at the first national march on Washington for gay rights, it was no happenstance that posters for the march proclaimed, “Come out, come out, wherever you are.” The 1970s were marked by a push for gays and lesbians to “come out of the closet.” Recall that the first gay protest had occurred only a decade earlier, in 1969, when gays at the Stonewall Inn in the heart of Greenwich Village fought back for the first time ever after yet another police raid on gay bars. Looking back today, it’s hard to believe even the Village was a place where police would arrest gays for congregating.

Harvey Milk, the first openly gay elected official in America, who served on the San Francisco City Council in the early 1970s, famously and regularly said that he came out in order to give “hope” to the kid in Altoona, Pa., who might read about a gay city councilman and might decide that societal acceptance was not an impossibility. Milk captured the essence of the 1970s push for “coming out”: “I would like to see every gay doctor come out, every gay lawyer, every gay architect come out, stand up and let the world know. That would do more to end prejudice overnight than anybody would imagine.” In the 1980s, gay leaders continued the push for gays to come out with annual “National Coming Out” days, while gay magazines like OutWeek and Out even “outed” closeted public officials who voted against gay rights.

Harvey Milk was right. Coming out did significantly reduce prejudice in America. Americans came to know gays as normal citizens, people they worked with, played sports with, and loved in their extended families. Would business leaders have pushed Brewer to veto that bill if they didn’t know and respect openly gay colleagues and friends? Would Republican former Vice President Dick Cheney publicly support gay marriage if his daughter hadn’t come out to him or if the former chair of both George W. Bush’s campaign and the Republican National Committee hadn’t come out as gay and apologized for his role in his party’s anti-gay platforms?

You may know that the mayors of Boston and New York boycotted their cities’ St. Patrick’s Day parades because parade organizers refused to allow gay marchers to openly join the parade (in a policy reminiscent of “don’t ask, don’t tell”). Less well known is that an openly gay couple from South Boston (where the parade originates) received support from parade organizers and neighbors for their own float celebrating “diversity,” with cannons shooting rainbow colors and equality symbols. “They know us as their neighbors first and as gay second,” explained Randy Foster, echoing the impact on heterosexuals of personally knowing gays in their communities.

The second major shift came about a decade ago when gay rights leaders, aided by psychologists, discovered through focus groups and polling that framing the concept of gay marriage as a “right” was speaking the wrong language. They simultaneously happened upon a surprising level of heterosexual support for the humanitarian idea that gay people might love and want to commit to their partners, just like anyone else. Gay leaders stopped talking about “rights” and started talking about “love and commitment.” "The rapid turnaround in public support for marriage equality is unprecedented, and it shows that message really matters," recalled Doug Hattaway, who conducted the research that led to the messaging shift.

That messaging shift took hold. When President George W. Bush’s former top lawyer at the Justice Department, Ted Olson, surprised conservative leaders in 2010 by fighting for gay marriage in a leading federal lawsuit, he explained, "If you are a conservative, how could you be against a relationship in which people who love one another want to publicly state their vows ... and engage in a household in which they are committed to one another?"