Peers voted by 260 to 216 to protect up to 15,000 young disabled people from cuts to employment support allowance.
Opponents of the coalition’s plans said they would mean disabled children who could never work would never be entitled to the benefit.
Ministers also suffered a defeat last month over elements of their plans to overhaul housing benefit.
As part of their drive to cut spending on welfare, the government wants to remove the so-called “youth provision” that allows some young people to receive contributory employment and support allowance (ESA) even though – due to disability or illness – they have not been able to work and build up National Insurance.
Welfare Minister Lord Freud said it was unfair for a young person to continue to get a contributory benefit without having “paid in” – even if they were to inherit a lot of money.
He estimated that 90% of those affected by the change would still get the income-related part of ESA.
But peers, led by crossbencher Baroness Meacher, argued it would have a “devastating” effect on young people with disabilities or long-term illnesses, depriving them of £25 a week.
She told the Lords: “These young people have conditions so severe that they are entitled to be supported.
“It really puts them in a completely different category from other people who grow up, are able to earn, able to build up capital, able to gain contributions.
“The government said they will protect the most vulnerable. The prime minister himself made a very personal commitment to help these people. Is there anyone more vulnerable than a severely disabled young person who has never and will never have the chance of earning a living?”
The measure will now be removed from the government’s flagship welfare reform bill, being considered by peers.
Ministers say the proposed legislation will increase incentives for people on benefits to work while making welfare expenditure more sustainable.