WHITE SULPHUR SPRINGS, W.Va.—President Donald Trump said Thursday that he is willing to walk away from immigration negotiations if Democrats won’t agree to his terms, and many involved in the debate said the chances of a deal appear to be fading.

“We’ll either have something that’s fair and equitable and good and secure, or we’re going to have nothing at all,” Mr. Trump told Republican lawmakers at a retreat at the Greenbrier resort here.

...