Transport Secretary Grant Shapps told the Sunday Telegraph a potential change in legislation could allow companies to hire temporary workers to cover some roles and prevent disruption.
Any intervention would not affect the rail strikes across Britain this month.
But Mr Shapps said changes could be brought in quickly to minimise future action in rail or other sectors.
Labour shadow chancellor Rachel Reeves told BBC One's Sunday Morning programme the proposals would make it "less safe to travel" and accused ministers of "sowing chaos and sowing division".
"The government is acting like arsonists rather than firefighters," she said.
A war of words between rail unions and ministers has been escalating since the RMT union announced three days of strikes, after talks about pay, terms and conditions, and redundancies fell through.
Mr Shapps said should the action continue then "further measures certainly would come in during this particular dispute, if it can't be resolved".
"We will be looking at the full suite of modernisation that's required," he told the Telegraph. "The country must not continue to be held to ransom."
The transport secretary said any change could involve secondary legislation, which can be signed off by ministers "very fast".
Meanwhile, writing in the Sun on Sunday, Mr Shapps warned rail workers who plan to strike this month that they will not be able to work overtime on subsequent days to top-up pay they will lose as a result of taking part in the action. It is is understood this is because rail companies may decide to run restricted timetables after the strike days.
Describing the strikes as a "disruptive and unnecessary stoppage", he wrote: "Rail managers and ministers are determined to ensure strikers cannot milk the system to maintain their income while inflicting misery on the public."
Days are passing quickly until this first wave of crippling train strikes start, with no current sign of a resolution.
The suggested legislative changes won't happen for the first wave of strikes in just over a week, but if there are more, Grant Shapps hopes agency workers can fill gaps.
But 40,000 workers are walking out, and 10,000 more on London Underground.
There are a few problems.
Firstly, the UK economy has a huge recruitment problem at the moment. There are record numbers of vacancies, and not enough workers to fill them. So finding 50,000 agency workers for the railways when we can't fully resource UK airports could be a challenge.
Secondly, both sides of this fractious industrial dispute have said that safety problems with agency workers make this plan impossible. Unions and the rail industry say safety-critical roles like signallers, guards, drivers can't easily be covered. They say these workers don't work for agencies, they already work in the railway.
Mr Shapps' comments come less than a month after rail unions reacted with fury to a government threat to make strike action illegal unless a minimum number of train staff remained working during a walkout.
In response, RMT general secretary Mick Lynch said: "We already have the most restrictive anti-democratic trade union laws in Western Europe and if the government attempts to reduce our rights further, the RMT along with the rest of the trade union movement will mount the fiercest resistance possible."
More than 40,000 RMT members working for Network Rail and 13 train operating companies across Britain will strike on 21, 23 and 25 June.
The RMT says train company workers had been subject to "pay freezes, threats to jobs and attacks on their terms and conditions".
Network Rail plans to cut 2,500 maintenance jobs in a bid to make £2bn of savings, but the RMT argues such a move would make accidents more likely.
The union's members voted by 87% to 11% in favour of industrial action.
Northern Ireland Secretary Brandon Lewis criticised the strike action and told the Sunday Morning programme that staff in the rail industry were already "very well rewarded".
"The median salary in the rail industry is about £46,000… against an average wage in this country of closer to £26,000," he said.
Asked about the proposals to replace striking workers with agency staff, he said the government was "not taking anything off the table" but would make sure the railways were "running properly and safely".
In a separate dispute over pensions and job losses, the RMT's London Underground members will also strike on 21 June.
The RMT is calling it the biggest dispute for over three decades and put the industrial action down to the "inability of the rail employers to come to a negotiated settlement".
Train and tram drivers, part of the Aslef union, are also set to strike in three locations this month.
Aslef's general secretary Mick Whelan called Mr Shapps' idea "impractical" and asked where the agency workers would come from.
"You can't just ship in a load of signallers and train drivers," he said adding: "If they are not working for the railway now they are either not medically fit, have been dismissed or don't want to do it anymore."
Christina McAnea - general secretary of Unison - predicted the move would prompt a backlash.
She warned that her union, which represents public service workers including nurses and social workers, would be "campaigning - doing more than campaigning - to make sure that it doesn't happen".