The £320m ILF currently provides support enabling nearly 19,000 severely disabled people in the UK to live independent lives in the community.
The High Court ruled in April that the closure decision was lawful, but this was overturned by the Court of Appeal.
The government said it was considering whether to contest the judgement.
During the Court of Appeal hearing, the five argued the High Court had misinterpreted the law and there had been a lack of proper consultation by ministers over the changes.
They said that, without ILF funding and support, they would be forced into residential care or lose their ability to participate in work and everyday activities on the same basis as able-bodied people.
The scheme’s average payout is £300 a week, and the government has said councils, which administer most social care, will take over funding this help.
In this case, the Equality Act creates a process that government must go through to ensure their decision affecting disabled people are lawful.
Ministers took the decision close the fund on 18 December last year.
Court of Appeal judges Lord Justice Elias, Lord Justice Kitchin and Lord Justice McCombe allowed the challenge to the High Court’s earlier ruling, quashing the original decision in favour of the government.
Lord Justice McCombe said the evidence upon which the decision had been based had not given “an adequate flavour of the responses received indicating that independent living might well be put seriously in peril for a large number of people”.
The disabled applicants feared that the decision to close the fund and devolve the money to local authorities would lead to a reduction, or even loss, of that money, which had previously effectively been ring-fenced.
Welcoming the “powerful” ruling, law firms Deighton Pierce-Glynn and Scott-Moncrieff & Associates, which represented the claimants, said their clients had “feared that the loss of their ILF support would threaten their right to live with dignity, and that they could be forced into residential care or lose their ability to work and participate in everyday activities on an equal footing with other people”.
The Court of Appeal decision was described as being “of major importance not just for the claimants, but for all disabled people”.
Minister for Disabled People Mike Penning said: “We are very pleased the Court of Appeal upheld how we undertook our consultation on the future of the fund, and they accepted that it had been carried out properly and fairly.
“We are disappointed with certain aspects of today’s decision, and we will be examining the judgement very carefully and considering the implications before deciding on the most appropriate way forward, which includes seeking leave to appeal.”
The prime minister’s official spokesman added that the Department for Work and Pensions was “now considering that judgement”.
Lawyer Kate Whittaker said the ruling was “an incredible, really powerful judgement”
The Equality and Human Rights Commission was permitted by the court to intervene in the case and made submissions on the proper application of the Equality Act and UN Convention.
The ILF was established in 1988, but the government decided in 2010 that it had become “no longer appropriate or sustainable” to keep running the scheme outside the mainstream social care system. The fund closed to new applicants soon afterwards.