The government shutdown sparked anger and befuddlement at my overwhelmingly liberal university.

But even though I’m a big supporter of ObamaCare, and share my colleagues’ outrage at the scorched-earth campaign to block it, I’m also relieved that this is what Washington was fighting about.

That is, I’m happy that the campaign was led by the Tea Party and its acolytes, instead of by the Christian Right.

For the past half-century, the Republican Party has been divided between people who want to live and let live and those who want to tell you how to live. And the libertarian team is winning, which is good news for anyone who cares about the fate of gay people in America.

In 2010, three years before the Supreme Court struck down the Defense of Marriage Act, Tea Party activist Shelby Blakeley explained why she opposed the law: “The Constitution does not allow federal regulation of gay marriage just as it doesn’t allow for federal regulation of health care.”

A majority of Republicans younger than 50 now support gay marriage, a Washington Post poll found this year. So do a whopping 81 percent of GOP voters under 30.

“It’s inevitable,” a Republican leader in Nevada declared in 2011, urging his party to back gay marriage. “It can and will be delayed, but not stopped.”

It’s easy to forget that the GOP stood four-square against gay rights and same-sex unions for more than 40 years. Homosexuality was a “wedge issue,” uniting Republicans while dividing Democrats. And it brought otherwise dormant GOP voters to the polls.

Consider singer Anita Bryant’s 1977 Save Our Children campaign to reverse an anti-discrimination law in Dade County, Fla. A former Miss America runner-up and a spokeswoman for the Florida citrus industry, Bryant warned that the measure would require schools to hire gay teachers — which in turn would lead to child molestation. She also told a TV audience that the Bible called for homosexuals to be put to death, “and blood shed over their heads.”

Few recall that Dade County voters came out in high numbers against gay rights, repealing their anti-discrimination law by a gaping 68 percent to 32 percent. By the next year, five other municipalities around the country had revoked their own gay-rights statutes.

Dozens of other jurisdictions passed anti-gay measures during the 1980s AIDS crisis, which televangelist and GOP presidential aspirant Pat Robertson called “God’s judgment against a nation that chooses to live immorally.”

President George W. Bush endorsed a federal amendment against gay marriage in 2003 and kept hammering at the issue during his re-election campaign the next year, when a gay-marriage amendment on the ballot in Ohio helped him carry that crucial state. Thirteen states passed anti-gay referenda in 2004, galvanizing “moral” voters behind the GOP. “I have never seen anything that has energized and provoked our grass roots like this issue,” one activist observed.

But the tide soon began to turn.

In some ways, the GOP’s campaign for “family values” was a victim of its success: As more gay couples created families of their own, straight Americans came to know them as neighbors, co-workers and friends. It also helped that a few Republican leaders, including Ohio Sen. Rob Portman and then-Vice President Dick Cheney, had out-of-the-closet gay kids.

Today, even GOP stalwarts like Rush Limbaugh and Glenn Beck back gay marriage or civil unions. “If it neither breaks my leg nor picks my pocket, what difference is it to me?” Beck asked in 2010, quoting Thomas Jefferson. “Honestly, I think we have bigger fish to fry.”

For Beck & Co., the biggest fish now is ObamaCare. You don’t have to agree with them on it to applaud the shift away from the “culture war.”

Republicans claim that ObamaCare will burden the American family. I think they’re wrong, but I’d much rather debate that question than whether gay people have the right to form families in the first place. Wouldn’t you?

Jonathan Zimmerman is the author of “Whose America? Culture Wars in the Public Schools.” He teaches history and education at NYU.