WASHINGTON—President Donald Trump faces the prospect of mounting two quick appeals after judges blocked his revised executive order on immigration, a dispute that could arrive at the Supreme Court just as it gets a new conservative member whose vote could be crucial.

Judges in Hawaii and Maryland halted Mr. Trump’s latest effort after finding he likely engaged in religious discrimination when he sought to bar U.S. entry for people from six Muslim-majority nations, a move the White House says could help fight terrorism.

...