BBC director-general Tony Hall said committing the corporation to fully fund TV licences for over-75s was the "right deal" in "difficult circumstances".
Culture Secretary John Whittingdale said the process will be phased in from 2018/19 with the BBC paying the full bill from 2020/21.
He told the House of Commons the broadcaster had agreed to "play its part in contributing to reductions in spending like much of the rest of the public sector" while further reducing its "reliance on taxpayers".
He also announced legislation will be brought forward in the next year to "modernise the licence fee" to cover public service broadcast catch-up TV - an apparent nod towards charging people who use the iPlayer.
The BBC licence fee of £145.50 is also expected to rise in line with the consumer price index (CPI) measure of inflation, Mr Whittingdale said.
Mr Hall said: "We have secured the right deal for the BBC in difficult economic circumstances for the country. This agreement secures the long term funding for a strong BBC over the next Charter period. It means a commitment to increase the licence fee in line with inflation, subject to Charter Review, the end of the iPlayer loophole and the end of the broadband ringfence. In the circumstances, the BBC has agreed to take on the costs for free licence fees for over-75s, and after the next parliament, will take on the policy.”
Labour labelled the "backroom deal" as "shabby".
Shadow culture secretary Chris Bryant said Labour would oppose the Government's plans if they are a "smash and grab raid" on the BBC and criticised the "utter shambles" as he hit out at proposals being briefed to the media and spoken about by Chancellor George Osborne ahead of Wednesday's Budget.
In a letter addressed to Mr Whittingdale and Chancellor of the Exchequer George Osborne, BBC Trust chairman Rona Fairhead said it would not "obstruct" the decision but added it could not "endorse the process by which it has been reached".
She said: "The Trust has a specific duty to represent the interests of licence fee payers. We are disappointed that they have not been given any say in the major decisions about the BBC's future funding. However, we accept that those decisions now set a clear financial framework, subject to the terms set out in your letter, for a Charter Review process that will focus on what the BBC provides in return for its funding. We will want to make sure the public are at the centre of that debate."
Colin Browne, who chairs campaign group The Voice of the Listener and Viewer, said: “It is disgraceful that this decision has been taken with no public consultation of any kind. We were promised a full and transparent discussion about the future of the BBC, but this has effectively been pre-empted by this announcement.”
Unions reacted with anger to the announcement and will meet later in the week to discuss their response.
Gerry Morrissey, general secretary of Bectu, said there had been no consultation with staff.
"It is a bad deal and we don't think it is the role of the BBC to carry out the Government's welfare policy," he told the Press Association.
Michelle Stanistreet, leader of the National Union of Journalists, said: "Despite repeated commitments made by Tony Hall to a process with full transparency, we find out through leaks and a forced statement to parliament that the BBC leadership has caved in to Government demands that will further weaken the BBC's ability to survive as a public service broadcaster of worldwide repute.
"That staff and licence fee payers found out about this done-deal in this way is a disgrace. NUJ members trusted that this time round there'd be a fight by the current leadership at the corporation to preserve the BBC's independence and capacity to continue delivering quality journalism and programming.
"I'm sure those individuals running the BBC have kidded themselves into believing they've got the best deal possible, just like Mark Thompson no doubt did last time round. There will be many more millions of licence fee payers who roundly object to the principle of the BBC allowing itself to be annexed by the Department for Work and Pensions."