I don't think he will win on the EO in its current form. Judges tend to defer to the executive on such decisions because they believe the executive has context and expertise on the subject that is not available to anybody in the judiciary branch. And that is normally true. However, Trump implemented this order with no consultation outside of a very narrow inner circle, far outside of normal procedures and processes for such a drastic policy, and thus far have been able to inspire any confidence that the alleged 'security threat' is well-founded. Judges aren't stupid, and you would have to be in order to not call shenanigans on the government's case.

Trump appears to be now considering that he might water down the order to something that is more likely to pass muster. He really doesn't like losing, so he will have to find something that he can spin as a victory.