In addition, staff have been offered a one-off payment of at least £1,655 to top up the past year's pay award.
Unions are recommending members back the deal, after nearly two weeks of talks with ministers, raising hopes the bitter dispute may be coming to an end.
The offer covers all NHS staff except doctors, who are on a different contract.
Health Secretary Steve Barclay said it was a "fair pay rise" that would also protect the government's commitment to halve inflation.
"I hugely admire the incredible work of NHS staff," he said. "I look forward to continuing our work together to make the NHS a better place to work."
Mr Barclay said there had been movement on both sides and praised the "constructive engagement" of the unions.
Fourteen unions were represented at the talks, covering:
* ambulance staff
* support staff, including cleaners and porters
The biggest three - the Royal College of Nursing, Unison and the GMB - are all backing the deal, while Unite the Union has said it cannot recommend it to members but will put it to a vote.
Unison head of health Sara Gorton said: "It's a shame it took so long to get here.
"Health workers had to take many days of strike action and thousands more had to threaten to join them to get their unions into the room and proper talks under way."
If her members accepted the deal, it would mean a "significant" boost in pay, Ms Gorton added.
RCN general secretary Pat Cullen said: "Members took the hardest of decisions to go on strike and I believe they have been vindicated today."
But Unite told BBC News that it is not advising its members on how to vote on the pay offer because "it falls short of what we were asking for".
Speaking to BBC News, Unite official Onay Kasab said members "wanted a consolidated payment... they did not want one-off non-consolidated sums".
The offer, he claims, is "not really going to help recruitment in the NHS" because "only current staff members will get it".
It comes after a winter of industrial action, with nurses, ambulance staff and physios all striking.
The unions put further action on hold, after the two sides agreed to discussions last month.
Prime Minister Rishi Sunak said he was "delighted" with the agreement over pay during a visit to a hospital in London on Thursday afternoon.
Despite weeks of criticism from opposition parties and unions about the government's "dither and delay" leading to more strikes, Mr Sunak said: "We have taken a reasonable approach throughout."
He also called the pay "affordable for the taxpayer and continues to deliver on my promise to halve inflation".
A Downing Street spokesperson later added the government does not believe the pay offer will be inflationary.
When asked about the fact it had said, earlier in the dispute, that giving more than a 3.5% pay award could stoke inflation, Mr Sunak's deputy spokesperson said he did not believe that would happen with this deal, adding: "We don't believe so. The two one-off payments for 22/23 we don't believe will create future inflationary pressures."
The spokesperson added the rise for the coming year would also not stoke inflation, since "5% is broadly in line with pay growth in the wider economy so we don't see it having an impact on private sector pay which ultimately leads to inflation".
And when asked whether the money to fund the rise would have to come from the existing NHS/Department for Health and Social Care (DHSC) budget the spokesperson insisted frontline service would not suffer and discussions were taking place between the DHSC and the Treasury.
When asked about further money for the NHS to fund the deal, the spokesperson again said discussions would take place with the Treasury.
However, shadow health secretary Wes Streeting criticised the "last minute" nature of the offer, calling the government "incompetent" and saying Mr Barclay "doesn't know how he's going to pay for it".
"Even when they arrive at a solution it's so late that it causes a new wave of problems."
NHS staff have seen pay rise by an average of 4.75% during 2022-23 - with the lowest paid receiving the biggest rises - but unions had been asking for above-inflation rises, which at one point, would have equated to an increase of more than 14%.
The one-off payment to top up that pay award starts at £1,655 for the lowest-paid staff such as cleaners and porters and rises to just over £2,400 for the most senior front-line roles such as nurse consultants.
For staff in management positions, such as directors of nursing and chief finance officers, the one-off payment is worth up to £3,789.
The government had originally offered 3.5% from April, for the 2023-24 financial year - but during the talks, ministers agreed to 5%. The lowest paid will receive more.
Matthew Taylor, of the NHS Confederation, which represents managers, said health leaders would "breathe a sigh of relief". "We now await the decision of union members," he said.
He also urged the British Medical Association to enter talks - junior doctors staged a three-day walkout this week, in their fight for a 35% pay rise.
They say this is needed to make up for below-inflation wages rises over the past 15 years - but ministers say it is unaffordable.
Ministers have offered the BMA talks on the same basis as with the other unions - but it has declined.
Strike action has also been paused in Wales and Scotland by most unions while new offers are considered. The GMB in Scotland has accepted the Scottish offer, worth 14% over two years.