Among the frustrated passengers was Clive Wratten, chief executive of the Business Travel Association (BTA), who was returning from a trip to the US.
Heathrow Airport told him and other passengers an e-gate failure was to blame for the lengthy delay.
The e-gate system has repeatedly malfunctioned in recent months as use has increased due to coronavirus lockdowns being lifted and international travel beginning to make a recovery.
“Saddens me to say this as past experiences good but arrival @HeathrowAirport this morning to find not a single e-gate working in T5 & yes you guessed mega queues,” Mr Wratten tweeted.
“Such a disappointing way to greet returning nationals and valuable guests from all around the world.
“You know you are in for a horrible experience entering Britain when the water trolley turns up.”
Bex, another stuck passenger, tweeted her displeasure at Heathrow.
“We are meant to be a leading country, not a developing one,” she said.
Heathrow Airport tweeted: “We’re aware of an issue impacting the e-gates, which are staffed and operated by Border Force.”
On Wednesday the people in the longest queues had to wait about two hours.
In Terminal 5, queues snaked around the arrivals halls and moved slowly as border officials were forced to check documents manually.
“The e-gate technology is quite fragile,” said Lucy Moreton, a spokeswoman for the Immigration Services Union. “You’ll find e-gates out at one location or another almost every day.”
The problem affected Border Force e-gates at a number of ports, a spokeswoman for the Home Office said.
“We are working to resolve the issue as soon as possible and apologise to all passengers for the inconvenience caused,” she said.
The border chaos threatens to mar the return of international travel as restrictions on more destinations are lifted.
The US this week lifted entry restrictions on foreign visitors after 20 months of restrictions.
Airlines have reported a surge in bookings and transatlantic journeys are filling up.
Gatwick, London’s second-largest hub, was not affected by the e-gate failure, a spokesman for the airport said on Wednesday.