The Rail, Maritime and Transport union (RMT) said discussions with Network Rail, train operators and London Underground had failed.
The strike will cause disruption across England, Scotland and Wales.
The Department for Transport said it was disappointing and that strikes should "always be the last resort".
The action, which will involve thousands of workers, will take place across 13 train operators and Network Rail on Tuesday, Thursday and next Saturday, and there will be a London Underground strike on Tuesday.
Operators have said there will be knock-on effects on other days as well.
Network Rail, which owns and maintains the country's railways, said the union was "dismissing talks before we've even finished" with more discussions planned for Sunday.
A Network Rail spokesperson said it was "serious" about trying to find a solution and a compromise which gave people a "decent pay rise", but was also affordable for taxpayers and farepayers.
Mick Lynch, the RMT's general secretary, told BBC Radio 4's Broadcasting House programme the latest offer from Network Rail was for a 2% pay increase, with a possible extra 1% if "productivity" conditions involving job cuts are accepted.
"We won't be bought off on that principle. We cannot have our members' lives disrupted in the way they are proposing," he said.
He added that he would support a so-called general strike if one were achievable.
"Working people in this country are fed up with low pay and precarious work as well as having decent conditions under threat," he said.
In a recent Q and A for members, the RMT said its position in all pay negotiations was for an above Retail Price Index (RPI) inflation pay rise.
RPI, a measure of inflation used to calculate the cost of living, was 11.1% as of April 2022 - up from 2.9% a year earlier. The union said it had recently secured an 8.4% rise workers on the London Underground.
As to whether pay rises should be backdated to compensate for pay freezes, the union said any rise "should reflect that members have not had a pay rise... and the drastic increase in the cost of living".
The RMT says there are proposals to cut 2,500 maintenance jobs on Network Rail, which the union claims could "increase the possibility of trains flying off the tracks".
Network Rail says it would never consider changes that make the railway or its people less safe.
Meanwhile, passengers have been warned by Network Rail not to travel on trains unless necessary during strikes next week, with about half of all rail lines closed.
A skeleton timetable on strike days will see about 20% of services running. For example, the last direct train from Edinburgh to London on Tuesday, the first day of the strike, departs at 12:30 according to the latest timetable from LNER.
The Rail Delivery Group said that "no one wins in the event of a strike" and said it would be working alongside Network Rail to keep as many services running as possible.
The group's chair Steve Montgomery said this week that taxpayers have supported the rail industry with "the equivalent of about £600 per household since Covid" adding that "passenger numbers are still only at around 75% of pre-pandemic levels".
A Department for Transport spokesperson said the government had committed £16bn to keeping the railways running during the pandemic, but warned the industry was still "on life support" and strikes could stop customers choosing rail travel in the future.
Labour leader Sir Keir Starmer he wanted all parties around the negotiating table "even at this late hour" as he did not want the strikes to go ahead.
"But, like the British public, I'm frustrated because the government is sitting it out, it's not lifting a finger to resolve these strikes," he said.