It follows a successful challenge by two claimants, a 19-year-old asylum seeker and a victim of sex trafficking, against the cuts.
Their case was supported by charities for victims of trafficking.
At the beginning of March, almost two months before Savid Javid became home secretary, the weekly cash amount payable to more than 1,000 potential victims of human trafficking was slashed by 42%.
Their weekly allowance fell from £65 to £37.75, but they will now be repaid the missing £27.25 per week after the court ruling, at an estimated cost of more than £1m.
Mr Justice Mostyn found the government failed to comply with obligations under the 2010 Equality Act.
The judge had been told how the teenage asylum seeker had fled persecution and severe exploitation at the hands of traffickers.
The reduction in payments was said to have damaged his mental health and exposed him to a risk of falling back into the hands of traffickers.
Silvia Nicolaou Garcia, a solicitor from law firm Simpson Millar who represented the teenager, said the payment cut forced her client into an “increasingly untenable and, frankly, inhumane situation”.
“He couldn’t afford the travel necessary to meet with his solicitors, which he is required to do on a regular basis, he had accrued debt and he could no longer afford to buy clothes, food, or mobile credit to allow him to keep in touch with his professional support network or his friends,” she said.
“We hope that the reversal of the cuts, and a back payment to cover losses, will help to provide stability and, importantly, safety for him.”
The other claimant, known as “K” and described as suffering from depression and post-traumatic stress disorder after being sex trafficked, said after the ruling: “I was so low because I was not able to do the activities which had been helping me before my money was cut.
“Now that I can afford to re-engage with my support network and activities, it makes me hopeful for my future.”
Liberal Democrat home affairs spokesman Sir Ed Davey attacked the prime minister, who has long championed efforts to tackle modern slavery, over the case.
He said: “Theresa May once rightly called modern slavery the great human rights issue of our time, but her government cut support for victims by 40%, leaving them vulnerable to further exploitation.
“Now that the court has ruled those cuts unlawful, the government must reverse them and ensure that victims receive the help they need to escape the terrible bonds of slavery.”
A Home Office spokesman said: “We accept the court judgement and will set out our response in due course.”
The spokesman added that ministers are committed to ensuring victims of modern slavery got the support they needed.