The barrier is part-fence, part-wall depending on Israeli security needs
It follows complaints from Palestinian villagers near the northern town of Qalqilya that the barrier cuts them off from the rest of the West Bank.
The court has ordered the government to consider other options for the route.
But it also rejected last year's world court ruling that the barrier was illegal and should be dismantled.
Israel says its 600km (370 mile) structure is needed to stop suicide attacks, but Palestinians call it a land grab.
The Israeli Supreme Court says the world court ruling was flawed as it did not consider Israel's security needs.
The government had already said it would not abide by the non-binding international ruling and has continued erecting the barrier on occupied Palestinian land.
Struggle for survival
The unanimous decision by the nine-judge panel orders the construction to be re-routed near the settlement of Alfei Menashe, which lies about six kilometres (four miles) inside the West Bank.
Those parts which severely violate Palestinian rights are not legal and the state will have to change the route in huge parts of the fence
Lawyer Michael Sfard
Q&A;: West Bank barrier
The court ruled that "the state must within a reasonable period reconsider the various fence route alternatives at Alfei Menashe while examining security alternatives which cause less injury to the lives of the residents of the villagers in the enclave".
The villagers' petition had said nearly every Palestinian in the Alfei Menashe enclave had lost their job.
"Their struggle for survival obligates them to choose between illegal infiltration into Israel and occasional work at starvation wages... as servants to the settlers," it said.
It is the second time Israel's judiciary has ordered the re-routing of a part of the barrier.
Correspondents say the construction of the barrier - which is more than half completed - remains a source of tension with the Palestinians following the evacuation of Jewish settlements in Gaza.
Guide to the West Bank barrier's structure and route
At-a-glance
Lawyer Michael Sfard for the villages said the court's decision could affect several other sections of the barrier, even though it contradicts the world court ruling.
"It says that some parts may be legal... but at the same time those parts which severely violate Palestinian rights are not legal and the state will have to change the route in huge parts of the fence," he said.
The Israeli authorities say it is a purely temporary security measure which can be removed as part of any future peace deal, but critics say it is intended as a future border, drawn unilaterally by Israel to keep large swathes of the West Bank.
Palestinian campaigners say that 16% of the Arab population in will be cut off from from Palestinian territory by the West Bank barrier and up to 47% of the occupied territory could be annexed by Israel.
The Israeli High Court has unanimously ruled that the controversial wall separating Israel from the West Bank should be rerouted.

The panel of nine justices gave their ruling on a petition submitted by the Association for Civil Rights in Israel and ordered that alternative routes be investigated around the settlement of Alefei Menashe.  The court ruling orders that the existing wall in the area be demolished and rebuilt nearer to the settlement.

The rerouting of the wall will result in the Palestinian village of Qalqilya, and four others, being on the West Bank side of the barrier.

The barrier has been a contentious issue between Israelis and Palestinians since construction began.  Israel's government ignored last year's non-binding ruling by the International Court of Justice which declared the barrier illegal.