WASHINGTON — Justice Neil M. Gorsuch is a profoundly conservative jurist and one of the two appointments President Trump has made to the Supreme Court that Republicans expected would fundamentally shape it to their liking for a generation.
But on Monday, Justice Gorsuch, 52, led the way on one of the most sweeping L.G.B.T. rights rulings in the court’s history, protecting gay and transgender people from workplace discrimination and confounding those who thought he would be a reliable conservative on those issues.
Justice Gorsuch took the place of Justice Antonin Scalia, who died in February 2016 but whose seat was kept open by Senator Mitch McConnell, the majority leader, until President Barack Obama had left the White House. Mr. Trump then made Justice Gorsuch his first appointment to the court less than two weeks after his inauguration.
Justice Scalia left a legacy as one of the court’s most fiercely conservative members, and while more courteous and mild mannered than his predecessor, Justice Gorsuch has largely echoed his legal philosophy from the bench.
Justice Gorsuch led a 6-to-3 majority in declaring that gay and transgender workers are protected by Title VII of the Civil Rights Act of 1964, which prohibits discrimination based on race, religion, national origin and sex. His ruling was joined not by his usual conservative allies, but by the court’s four liberals and Chief Justice John G. Roberts Jr.
“In Title VII, Congress adopted broad language making it illegal for an employer to rely on an employee’s sex when deciding to fire that employee,” Justice Gorsuch wrote for the majority. “We do not hesitate to recognize today a necessary consequence of that legislative choice: An employer who fires an individual merely for being gay or transgender defies the law.”
Justice Gorsuch has repeatedly said he is a staunch believer in “textualism,” in which judges look only at the written words of a statute rather than the intent of the lawmakers who wrote them. In Monday’s opinion, he said the words of the Civil Right Act were clear.
“When the express terms of a statute give us one answer and extratextual considerations suggest another, it’s no contest,” Justice Gorsuch wrote in the opening paragraphs of his opinion. “Only the written word is the law, and all persons are entitled to its benefit.”
His conclusion: “An employer who fires an individual for being homosexual or transgender fires that person for traits or actions it would not have questioned in members of a different sex.” And therefore, he said, the employer is in violation of the Civil Rights Act and the law.
In writing the opinion, Justice Gorsuch assumed the role of his mentor, former Justice Anthony M. Kennedy, for whom he once was a clerk. Justice Kennedy played a pivotal role in many of the biggest gay rights cases of the last quarter-century and was the deciding vote and wrote the majority opinion in Obergefell v. Hodges, the 2015 case that established a constitutional right to same-sex marriage.
When Justice Kennedy retired in 2018, gay rights advocates said they feared that the court was less likely to support their cause. Instead he wrote an opinion that was immediately hailed by gay and transgender rights groups as a landmark victory.
With his opinion, Justice Gorsuch employed a fundamentally conservative principle — a literal reading of the words of a statute — to reach a decision that contrasts sharply with the conclusions of the other conservative justices on the court.
In a dissent, Justice Samuel A. Alito Jr. called the majority’s reasoning “preposterous” and said it was difficult to recall a “more brazen abuse of our authority to interpret statutes.”
Asked about the ruling Monday afternoon, Mr. Trump said that “some people were surprised” but added that the court had “ruled and we live with their decision.”
But for many who have known Justice Gorsuch for years, Monday’s opinion may not have come as a complete shock.
Longtime gay friends have said they have always found him to be accepting of them and even happy about who they are. Before joining the Supreme Court, he had two openly gay clerks. And the Episcopal church he attended in liberal Boulder, Colo., before coming to Washington welcomed gay members.
Joshua Goodbaum recalled in 2017 how he described himself to Justice Gorsuch, at the time a judge on the United States Court of Appeals for the 10th Circuit, during an interview for a clerkship in 2008: “I said, ‘Listen, I’m a liberal gay Jew from New England and you were appointed by George W. Bush, and I want to make sure I’m not going to be uncomfortable here.’”
Mr. Goodbaum told The New York Times that when he married his longtime partner in 2014 — before the court legalized gay marriage — Justice Gorsuch was “thrilled for us.”
When Mr. Trump picked Justice Gorsuch for the court, some of those gay friends and former clerks predicted that it would be difficult to pigeonhole his legal approach to the issue of gay rights when he became a justice. Few liberal groups paid much attention, engaging in a fierce effort to keep him off the court.
Lambda Legal, a gay rights organization, posted a statement in January 2017 with the headline “Neil Gorsuch Has an Unacceptable, Hostile Record Towards L.G.B.T. People” and a picture of Justice Gorsuch with the word “DANGEROUS” printed over his face.
On Monday, many of those same groups hailed his opinion.
“Victory at Last! Supreme Court Confirms Workplace Protections for L.G.B.T.Q. Employees,” Lambda Legal wrote in a statement on its website, noting that the opinion was written by Justice Gorsuch.
Demand Justice, a liberal group that fought against Justice Gorsuch’s confirmation, praised the ruling even as it expressed doubts about whether he would continue to be an ally in the future.
“This historic decision is a massive victory for L.G.B.T.Q.+ activists who’ve built a movement so strong that not even John Roberts or Neil Gorsuch could ignore it,” Brian Fallon, the group’s executive director, said in a statement. “Unfortunately, hoping and praying that Roberts and Gorsuch will consistently do the right thing is not a winning strategy for securing our civil rights over the coming decades.”
Conservative legal scholars — who were instrumental in persuading Mr. Trump to select Justice Gorsuch and lobbied heavily for his confirmation — denounced his opinion, calling it a travesty of conservative legal thought.
Carrie Severino, the president of the Judicial Crisis Network, said the opinion represented the “hijacking of textualism” and wrote on Twitter that Justice Gorsuch was betraying the legacy of the justice whose seat he holds.
“Justice Scalia would be disappointed that his successor has bungled textualism so badly today, for the sake of appealing to college campuses and editorial boards,” Ms. Severino said, adding: “You can’t redefine the meaning of words themselves and still be doing textualism. This is an ominous sign for anyone concerned about the future of representative democracy.”
Ms. Severino and the leaders of other conservative legal organizations, including the Federalist Society, had eagerly supported Mr. Trump’s choice of Justice Gorsuch to replace Justice Scalia, describing him at the time as a jurist with rock-solid conservative credentials.
On the day in April 2017 that Justice Gorsuch was confirmed by the Senate, Ms. Severino predicted that the vote would be a victory for conservatives for years to come and that “because of Judge Gorsuch’s commitment to judicial independence and the rule of law, Justice Scalia’s legacy will continue on the Supreme Court.”