Members of the Public and Commercial Services Union have voted for the 24-hour strike on July 26 in a dispute over pay and job losses - an Olympic-sized headache for British officials.
Home Secretary Theresa May said the decision to stage a strike on the eve of the London Games was "shameful."
The union said its members will take other forms of industrial action, such as a ban on overtime, from July 27 to Aug. 20 - the period of the games and beyond.
Britain's government is eager to avoid any disruption as visitors descend for the July 27-Aug. 12 games.
Heathrow Airport has been beset for months by long lines at passport control, which the union blames on government spending cuts.
The problem has eased as thousands descend on London for the games, but a walkout threatens a return of the long waiting times at the worst possible moment.
May said the government would "put contingency arrangements in place to ensure we can deal with people coming through the border as smoothly as possible."
In more transit trouble, about 400 train workers threatened to strike for three days in central England during the Olympics in a pension dispute.
Drivers for East Midlands Trains said Thursday the strike would be from Aug. 6 to 8.
The strikes could be highly disruptive to the games - Olympic soccer matches are being held across the United Kingdom, many workers are coming from outside London and thousands of spectators are likely to use trains to get to venues around the capital.
Get Eyewitness News Delivered