It was a jarringly unorthodox moment even for Donald Trump. At a rally in Colorado last October, an audience member handed him a gay pride flag that bore a handwritten endorsement: “LGBTs for TRUMP.” The candidate smiled as he unfurled the flag, displaying it for a few seconds. A spokesman later said Mr. Trump was “proud to carry the ‘L.G.B.T. for Trump’ rainbow flag on stage,” since he was campaigning to be “president for all Americans.”

It didn’t take long for prominent gay Republicans to proclaim that the Republican Party had, at long last, turned a corner on gay rights under Mr. Trump. After he was elected, some gay rights activists held out hope that Ivanka Trump and Jared Kushner, the president’s daughter and son-in-law, would be staunch allies in the West Wing, considering that they had traveled in liberal circles in New York.

Yet, the nomination of several key officials, who have disparaged the L.G.B.T. community and sought to curtail the rights of its members, has exposed the narrative that Mr. Trump would be a champion of gay and transgender people as a fallacy. “It has been a catastrophe,” said Mara Keisling, the executive director of the National Center for Transgender Equality and a leading strategist behind a string of legal and policy victories the community achieved during the Obama administration. “Every twitch we’ve seen from the administration has been anti-L.G.B.T.”

At the Department of Justice, where former Attorney General Loretta Lynch last year delivered an impassioned speech telling transgender Americans, “We see you; we stand with you,” her successor, Jeff Sessions, wasted no time reversing course. The Justice Department in February withdrew guidance issued to schools on the treatment of transgender students, signaling that it would no longer consider their rights to be protected under a 1972 civil rights law.