Immigration and passport workers at Heathrow and other airports are among those due to go on strike on Thursday in protest about job cuts.
The Home Office said it believed there was “procedural errors” in a ballot conducted by the PCS union.
The union said it was “confident” the strike was legal and would happen.
The threat of a mass walkout on the day before the opening ceremony of the Olympic Games has been condemned by ministers and Labour alike.
In a ballot earlier this month, 57% of PCS members taking part voted for industrial action – although ministers have said only 12% of total union members participated.
About 16,000 union members were balloted across the Home Office, including in the Border Agency, the Identity and Passport Service and the Criminal Records Bureau.
In a statement, the Home Office said it believed “there was a procedural error in the PCS ballot” and it would be challenging it in the High Court – a request due to be heard on Wednesday.
“We want the PCS leadership to call off this irresponsible strike and we continue to ask members not to walk out at a time when the eyes of the world are on the UK,” it added.
Deputy Prime Minister Nick Clegg said it was fair for unions to raise issues with the government but “to mess up the Olympics for everybody else, I just think is not fair, it’s a bit cynical”.
The PCS union has said 8,500 Home Office jobs are at risk as a result of government cuts, including the threat of compulsory redundancies at passport control and immigration offices.
Sources in the PCS union told the BBC they will “robustly challenge” the injunction.
They said they were “confident” they conducted the strike ballot legally and will be able to proceed with the strike. If the government is successful in the High Court, then the union would be obliged to re-ballot its members.
The BBC’s chief political correspondent Norman Smith said he understood PCS negotiators were in talks with Home Office officials earlier on Tuesday but were not made aware of the injunction threat.
The government insists contingency plans are in place in the event of industrial action.
Mayor of London Boris Johnson said there would still be “ample provision” of staff at Heathrow to “keep the system moving”.
Earlier this month, the government’s spending watchdog, the National Audit Office, said the UK Border Agency had laid off 1,000 more staff than intended and was having to hire extra people and increase overtime to meet its workload.
The PCS is one of the largest unions in the UK with around 250,000 public sector members.
PCS members at the Department for Transport have been taking industrial action over the past few weeks, while staff in other departments, including the ministries of defence and justice, are set to vote shortly on how to campaign against cuts.
BBC © 2012