WASHINGTON—Republican opponents of President Barack Obama’s immigration actions attempting to block his policies in court gained needed legal traction for their fight from a Texas-based federal judge’s opinion released late Monday.

U.S. District Judge Andrew Hanen’s 123-page opinion found that officials from 26 states had the right to challenge the law—something the Justice Department disputed—and offered a scathing indictment of how the White House put its policies in place.

...