A Super 12s exit looked to be on the cards for Pakistan after defeats against both India and Zimbabwe but Babar Azam's side kept themselves in the hunt by beating the Netherlands and South Africa.
Had South Africa won their final group game, also in Adelaide, then Sunday's later game would have been irrelevant but the Proteas' slip-up meant a straight shootout between Pakistan and Bangladesh.
Shaheen Shah Afridi was outstanding in taking four for 22 as Bangladesh were restricted to 127 for eight, with Najmul Hossain Shanto's 54 off 48 balls crucial for the Tigers, who won the toss.
There was controversy when the on-field lbw verdict against Shakib Al Hasan was upheld by the third umpire as technology was inconclusive about whether the Bangladesh captain had got bat to ball.
Bangladesh were on 70 for one at halfway but they lost momentum and wickets fell at regular intervals in the second half of their innings.
Pakistan openers Babar and Mohammad Rizwan put on 57 in 10.3 overs, although the former looked short of fluency while the latter was given a let-off when he was dropped on nought by wicketkeeper Nurul Hasan.
Babar contributed 25 off 33 deliveries while Rizwan made a run-a-ball 32 before Mohammad Haris injected some urgency into proceedings with 31 off 18.
Shan Masood made 24 off 14 balls to make sure there was no late drama as Pakistan ultimately coasted to victory with 11 balls remaining.