The 33-year-old Nottinghamshire batter replaces Bairstow who sustained a serious leg injury in a "freak accident" on the golf course last week and is set for a lengthy spell on the sidelines.
Bairstow is understood to have slipped while approaching a tee box during a round at Pannal Golf Club near Harrogate, an innocuous incident that has left him requiring surgery.
The 32-year-old will be badly missed by his country, having hit a career-best run of form in the Test arena and just been handed a crucial new role at next month's T20 tournament in Australia.
Hales has not played for England since March 2019. He failed a recreational drugs test and former England one-day captain Eoin Morgan said that had led to a "complete breakdown in trust".
However, Hales' form - along with Morgan's retirement - has seen him force his way back into the selectors' thoughts.
The England and Wales Cricket Board confirmed his recall in a short team update issued on Wednesday morning.
Surrey's Will Jacks was positioned as the next man in after being called up for the forthcoming T20 tour of Pakistan, but Hales' experience and wealth on runs on the franchise circuit meant he was leapfrogged at the last moment.
Hales has been prolific in the shortest format, recently becoming the first Englishman to reach 10,000 T20 runs, and also has useful experience in Australia's Big Bash League so knows the tournament pitches well.
The ECB's managing director of men's cricket, Rob Key, appears to have been instrumental in softening the selection stance given his current role as head selector, but Morgan's successor as limited-overs skipper, Jos Buttler, and new white-ball head coach Matthew Mott must also have been keen.
Speaking at the initial squad announcement, which narrowly preceded Bairstow's golf club mishap, Key explained Hales' ongoing absence and hinted that an olive branch could be offered.
"I spoke to Alex Hales, he rang me actually, and he argued why he wasn't there," he said.
"I much prefer when these people pick up the phone and say, 'come on then, why wasn't I there?' I have a huge amount of respect for that as opposed to people who go behind the scenes moaning about why they've not been picked."
Hales' return may also have been run by Test captain Ben Stokes, who was once close with the free-hitting opener. Hales was involved in the late-night incident in Bristol in 2017 which ended up with Stokes being charged with, and ultimately acquitted of, affray.
Hales was not charged with any wrongdoing but it is understood his subsequent behaviour left Stokes and other senior players feeling let down. In his recently released documentary 'Phoenix from the Ashes', Stokes discusses the brawl and pointedly refers to Hales as "my friend at the time".
With Buttler currently injured, Hales has a chance to make his case for a World Cup starting spot during the seven-match stretch in Pakistan. Phil Salt was pencilled in at the top of the order but pairing up Hales and Dawid Malan, who opened together in Trent Rockets' Hundred triumph this season, is another option.