Paying union dues and baking a wedding cake may not seem like classic examples of free speech—except perhaps at the Supreme Court.

This year, the high court is poised to announce its most significant expansion of the 1st Amendment since the Citizens United decision in 2010, which struck down laws that limited campaign spending by corporations, unions and the very wealthy.

Now the “money is speech” doctrine is back and at the heart of a case to be heard this month that threatens the financial foundation of public employee unions in 22 “blue” states.

Like Citizens United, the union case is being closely watched for its potential to shift political power in states and across the nation.

The legal attack on the campaign funding laws was brought by conservative activists who hoped that the free flow of money from wealthy donors would boost Republican candidates. And since 2010, the GOP has achieved big gains in Congress and in state legislatures across the nation.

Conservatives also believe the attack on mandatory union fees has the potential to weaken the public sector unions that are strong supporters of the Democratic Party.

Still pending before the high court is the case of the baker from Colorado who says he has a free-speech right as a Christian to refuse to create a wedding cake for a same-sex couple. A ruling in his favor would carve out a religious-freedom exemption to the civil rights laws in the 21 states that require businesses open to the public to provide full and equal service to all, including gays and lesbians.

President Donald Trump’s administration has endorsed Gov. Bruce Rauner’s side of a legal case challenging fees public employee unions collect from nonmembers, saying in a brief filed with the U.S. Supreme Court that the system is unconstitutional.

Rauner brought the case shortly after he was sworn...

At issue in the union case is whether public employees can be required to pay a fee to cover the cost of collective bargaining and resolving grievances, even if they have personal objections to the union.

In 28 states, “right to work” laws prohibit contracts that require employees to join or support a union. In recent years, formerly strong union states including Michigan, Wisconsin and Indiana adopted such laws.

But in 22 other states, including California, New York and Pennsylvania as well as Illinois, the law allows employees to form a union which in turn has a legal duty to represent all the employees.

In those states, school boards, transit districts, police departments and state agencies may negotiate contracts that require all workers—even those who do not join the union—to pay a so-called “fair share fee” for the benefits they would receive along with union members, such as higher pay scales.

More than 40 years ago, the Supreme Court gave this arrangement its constitutional blessing. The justices set out a middle position in the case of the case of Abood vs. Detroit Board of Education. They said public employees have a free-speech right to opt out of paying the full dues to a union if some of the money is spent for political contributions or lobbying. However, the court said, they may be required to pay a lesser fee to support the union’s workplace activities. Otherwise, “free riders” could benefit from a better contract, but pay nothing.

Gov. Bruce Rauner on Tuesday narrowly fended off a major loss for the second time in as many weeks when the Illinois House failed to override his veto of union-backed legislation to prevent local governments from establishing right-to-work zones.

The override attempt again fell short by just one...

The Illinois lawsuit asks the court to overturn the Abood decision and strike down forced union fees nationwide.

Soon after taking office in 2015, Rauner had tried to block union fees through an executive order, and when that failed, he filed a suit in federal court contending the payments were unconstitutional.

Illinois’ Democratic Atty. Gen. Lisa Madigan intervened to defend the state’s labor law, and a judge ruled the governor had no standing since he was not paying the fees. But the suit continued after his lawyers substituted as a plaintiff Mark Janus, a child support specialist. He works for a state agency in Springfield and objects to the $45 fee he pays each month to the American Federation of State, County and Municipal Employees.

The union “takes political positions that he doesn’t support. They advocate for more spending and higher taxes,” said Jacob Huebert, a lawyer for the Liberty Justice Center who represents Janus.

For its part, AFSCME called the case “a political attack on the freedoms of working people by the same corporate billionaires and corporate interests that have for years rigged our economy and politics in their own favor.”

Rauner’s challenge to union fees is likely to win favor from the court’s five more conservative justices, all of them Republican appointees. Two years ago, the court was set to strike down mandatory union fees in a case brought by a California schoolteacher. But the sudden death of Justice Antonin Scalia left the court split 4 to 4.

Once Justice Neil M. Gorsuch, appointed by President Trump, was confirmed to fill Scalia’s seat, the court said it would decide the union fees issue in the case from Illinois.

“I’m highly confident” about the outcome, Rauner said in December. “With Gorsuch at the Supreme Court, we believe we will prevail.”

Union leaders see the case as a well-funded political attack on public employees. “This is about power. They are attacking us because we fight for a better life for working people,” said Randi Weingarten, president of the American Federation of Teachers. They say they are reasonably confident members will continue to pay their dues, even if they are no longer required to do so.

Beyond politics, however, the legal question before the court is whether requiring public employees to pay a fee to a union to cover the cost of collective bargaining amounts to “compelled speech” that violates the 1st Amendment.

For most of American history, government employees did not have protected rights under the Constitution. The justices often cite Oliver Wendell Holmes’ comment in 1892 that a policeman “may have a constitutional right to talk politics, but he has no constitutional right to be policeman.”

It was not until the late 1960s when the court first held that public employees had free-speech rights, but only when they were speaking as citizens on a matter of public concern. The justices ruled unanimously in 1968 for Marvin Pickering, an Illinois schoolteacher who was fired for sending a letter to the editor of a local newspaper that was critical of the school board.

But the court has insisted public employees do not have rights to speak out about problems in the workplace. In 2006, the court said the 1st Amendment does not generally protect government whistleblowers from being punished or demoted. In that case, Garcetti vs. Ceballos, the court ruled 5-4 against a Los Angeles county lawyer who said he was demoted for having revealed a police officer may have supplied false information in a search warrant. The court’s conservatives sided with their employer. “A government entity has broader discretion to restrict speech when it acts in its role as employer,” and a public employee “must accept certain limitations on his or her freedom,” wrote Justice Anthony M. Kennedy.

Harvard law professor Charles Fried, the U.S. solicitor general under President Reagan, filed a brief in the union case questioning how the court could say the 1st Amendment protects public employees from paying a union fee, but not for speaking out about problems in an agency.

“We think this is not compelled speech. It’s a compelled payment of money,” said UCLA law professor Eugene Volokh. He noted lawyers, doctors and other licensed professionals are required by state laws to pay fees for continuing education classes, including on topics some may oppose.

The Supreme Court upheld mandatory bar dues for lawyers in 1990, relying on the Abood decision. And in 2000, the court rejected a free-speech challenge to the required student fees at state universities. Conservative students at the University of Wisconsin had sued, contending they should not be forced to subsidize left-leaning speakers and student groups.

But Justice Samuel A. Alito Jr. has made clear he thinks the Abood decision must go. It conflicts with the “bedrock principle that, except perhaps in the rarest of circumstances, no person in this country may be compelled to subsidize speech by a third party that he or she does not wish to support,” he wrote.

Alito, President George W. Bush’s second appointee, played a key role in the Citizens United case. Before his arrival in 2006, the court with Justice Sandra Day O’Connor had upheld the McCain-Feingold Act and its limits on campaign money. But when Alito replaced her, he helped form the 5-4 majority that struck down a series of campaign laws on free-speech grounds.

He then targeted public sector unions. In 2012, he wrote the court’s opinion in a California case called Knox v. SEIU involving refunds for employees who did not want to pay for the union’s political spending. In that ruling, he questioned the Abood decision and sympathized with employees who would “prefer to keep their own money rather than subsidizing the political agenda of a state-favored union.”

His words in turn prompted lawyers for the National Right to Work Foundation to challenge Abood directly. They sued on behalf of home care workers in Illinois, but fell just short in 2014 in the case of Harris vs. Quinn. Alito wrote a long opinion casting doubt on the Abood precedent, but the 5-4 majority decided only that the home care workers were not true state employees.

The four liberal justices, all Democratic appointees, dissented, and noted that thousands of union contracts in more than 20 states rely on the principles set in Abood.

Anti-union advocates tried again in Friedrichs vs. California Teachers Assn, but fell short again because of Scalia’s death. The justices will hear Janus vs. AFSCME on Feb. 26, expecting this time to finally resolve the dispute.