David Cameron has secured support from all EU states for new flexibility on VAT which will allow the UK to introduce a zero rating for sanitary products such as tampons.
UK officials said that the European Commission has signed up to the change and will put forward proposals next week. A formal announcement is expected on Wednesday, though the implementation of new rates may take some time to be approved.
The development came after the Government learnt it was facing a Commons revolt by Tory MPs demanding it acts unilaterally to withdraw the charge - in defiance of EU rules.
Chancellor George Osborne had said he expected an announcement "in the next few days" on the so-called "tampon tax".
But Mr Cameron decided to force the issue by raising it at a summit of the European Council in Brussels, where he first spoke to Commission president Jean-Claude Juncker and then asked fellow leaders to include a commitment in the official conclusions of the two-day meeting.
The 28 leaders agreed unanimously to a statement welcoming "the intention of the Commission to include proposals for increased flexibility for member states with respect to reduced rates of VAT, which will provide the option to member states of VAT zero-rating sanitary products".
A petition calling for an end to the tampon tax has attracted more than 300,000 signatures.
And a number of Conservative MPs had threatened to vote for an amendment to the Finance Bill in the Commons on Tuesday to allow the zero-rating of women's sanitary products.
The parliamentary move was in part driven by a determination by pro-Brexit MPs to embarrass the Government over the role of the EU in setting VAT.
Opponents of Britain's EU membership have seized on the tampon tax as an example of Brussels' influence over British life. The 5% rating is the lowest permissible under EU laws, though exemptions are allowed for countries - like Ireland - which had a 0% levy at the time of their entry into the EU.
Speaking ahead of Thursday evening's agreement, Mr Osborne told the BBC Radio 4 Today programme he "perfectly understood" people's anger over the 5% VAT rating on tampons and said he was hoping for a breakthrough within the next few days.
Treasury minister David Gauke wrote to the Commission in November setting out the UK's call for change.
Mr Osborne announced in his Autumn Statement that the £15 million raised each year from the "tampon tax" would in future be used to support women's charities and services until the EU was persuaded to allow the UK to scrap VAT on sanitary items. It was not clear whether the charities involved would be compensated for the loss of this income once the 0% rating is in place.
Ukip leader Nigel Farage said Britain had been reduced to pleading on its knees for permission from "unelected bureaucrats" to remove the tax.
Mr Farage told ITV News: "Isn't that wonderful? We have begged for crumbs from the table and for once we have got some. It's pathetic for our country to have sunk to this level."
Mr Osborne said the deal showed the value of being a "powerful, confident voice" in the EU. He said: "We heard people's anger over paying the tampon tax loud and clear.
"We said we'd use the money to benefit women's charities and we've already distributed £17 million to good causes across the country.
"At the same time we said we'd fight for agreement to reduce the VAT rate to zero, and tonight all European leaders have welcomed our plan to do just that. We've achieved what no British government has even tried to achieve."
Paula Sheriff, Labour MP for Dewsbury, said: "We expect this decision to be reflected in this year's Budget, with a clear timetable for abolition of the tampon tax in the UK. My amendment would allow that, so I hope that the Chancellor will announce now that he will accept it.
"There is no excuse not to act now, and reform is long overdue - 2017 should be a deadline not an aspiration. In the meantime, the Chancellor should guarantee that essential women's services won't depend on a tax on essential women's products."
Alison Thewliss, SNP MP for Glasgow Central, said: "This is a victory for the tens of thousands of women in the UK who've signed petitions, lobbied their MPs and kept up the pressure over many years to scrap this totally unjust tax on an absolutely essential product."