LONDON—A U.K. court put a hurdle in the country’s route out of the European Union, ruling that Prime Minister Theresa May can’t start the process without approval from Parliament.

The High Court decision offers a potential opening to lawmakers to disrupt her plans and steer the country toward a “soft” exit that maintains stronger ties to the bloc and a more-open immigration policy.

The...