The three-judge panel in the U.S. Court of Appeals for the District of Columbia ruled that the administration had "not shown a strong likelihood that they will succeed on the merits of their challenge" to a district court’s previous order blocking the ban.
The 4th U.S. Circuit Court of Appeals in Richmond, Virginia, on December 21 also denied the administration's bid while the appeal process proceeds.
Those decision could lead the administration to ask U.S. Supreme Court -- which has a conservative majority -- to intervene.
In a Twitter posting in July, Trump wrote that the government "will not accept or allow" transgender individuals to serve "in any capacity" in the military.
His predecessor, President Barack Obama, in 2016 set a policy change that allowed transgender people to serve openly for the first time.
Obama had also set a deadline of July 1, 2017, for the military to begin accepting transgender recruits, but Trump's defense secretary, James Mattis, postponed that date to January 1, 2018.