Democrats said the order will be fought in the courts and in Congress, and they urged Republicans to join them in opposition.