The filing came in a discrimination case before the United States Court of Appeals for the Second Circuit involving Donald Zarda, a skydiving instructor. In 2010, Mr. Zarda was fired by his employer, a Long Island company called Altitude Express. Before taking a female client on a tandem dive, Mr. Zarda told the woman he was gay to assuage any awkwardness that might arise from his being tightly strapped to her during the jump. The woman’s husband complained to the company, which subsequently fired Mr. Zarda. Mr. Zarda then sued Altitude Express, claiming it had violated Title VII.

Under Attorney General Jeff Sessions, the Justice Department has now stepped into the fray. In its brief, the department noted that every Congress since 1974 has declined to add a sexual-orientation provision to Title VII, despite what it called “notable changes in societal and cultural attitudes.” The brief also said that the federal government, as the largest employer in the country, had a “substantial and unique interest” in the proper interpretation of Title VII.

In 2015, the Equal Employment Opportunity Commission, under Mr. Obama, issued a contrary ruling, deciding on a vote of three Democrats to two Republicans that discrimination on the basis of sexual orientation was illegal. That ruling, which was reviewed by the Obama administration’s Justice Department, did not formally bind the federal courts, although courts often defer to federal agencies when they interpret laws that come under their jurisdiction.

In its brief, the Trump administration’s Justice Department said the E.E.O.C., which had also filed court papers supporting Mr. Zarda, was “not speaking for the United States.”

In 2014, Eric Holder, Mr. Obama’s attorney general, issued a memo stating that in any litigation that came before it, the Justice Department would take the position that the protections afforded by Title VII would be extended to include a person’s gender identity, including transgender status. The future of that memo under Mr. Trump remains unclear.