Asked to bat first, Sri Lanka posted a competitive 189 for 4 from the stipulated 20 overs.
England then got off to a worst possible start, losing Michael Lumb and Mooen Ali in the opening over, without a run on the scoreboard.
With the likes of Ajantha Mendis and Lasith Malinga in their ranks, Sri Lanka looked certain to roll over the English.
But Hales, who opened the innings with Lumb, was not ready to go down without the fight, and took the attack to the opposition with counter-attacking game.
The dew didn’t help Sri Lanka’s cause either as the spinners found it tough to grip the ball.
Hales took on Angelo Mathews and hit the boundary boards in the second over. He then repeated the shot off Nuwan Kulasekara (4-32), who had dismissed Lumb and Ali.
He and Eoin Morgan turned the match on its head with sensational hitting. The two batsmen rattled up a 152-run stand for the third wicket.
Hales upped the ante in the 13th over, bowled by Thisara Perera, by smashing him for three boundaries.
He then made merry in Mendis’s last over, smoking three massive sixes and a boundary to bring the run-rate down dramatically and reached the three-figure mark with a six off Kulasekara, to become the first Englishman to hit a century in T20s.
Aptly, Hales finished the game with another six, the ball vanishing over mid-wicket in the last over to complete England's highest-ever run chase with four balls to spare.
At the end of it all he had hit six sixes and 11 boundaries in his 64-ball 116.
More importantly, he kept England in the race for a berth in the semi-finals.
Image: Alex Hales
Photograph: Gareth Copley/Getty Images
PHOTOS: Hales heroics spark brilliant England victory
England's Hales storm sinks Sri Lanka
WT20 PHOTOS: Sri Lanka edge past South Africa
Sri Lanka rout Netherlands for lowest T20 total, post fastest win
McCullum inches closer to 2000-run mark in T20s