At lunch Wednesday on the fourth day, Australia were 31 without loss chasing a target of 307 for a win. Left-handers Michael Hussey (18) and Matthew Hayden (12) were the not out batsmen.
Australia, who have won both their previous Tests against Bangladesh by innings margins, bounced back in style after having conceded a huge 158-run first innings lead.
After reducing Bangladesh to 124-5 on the third day, Australia dismissed the remaining batsmen for just 24 runs with Warne and Gillespie sharing five scalps Wednesday morning.
Paceman Gillespie struck the first blow when Khaled Mashud (zero) was bowled offering no stroke to a ball that came in sharply.
Gillespie also dismissed other overnight batsman Rajin Saleh (33) even as leg-spinner Warne grabbed three quick scalps after going wicketless in the match so far.
Warne trapped Mohammad Rafique leg-before after the left-hander hit three fours off him in the previous over, and bowled Mashrafe Mortaza with the very next ball.
Last man Enamul Haque (zero) too was trapped leg-before by the world's most successful Test bowler as the home side displayed a familiar second-innings collapse.
Warne and Gillespie finished with three wickets each, Gillespie conceding just two runs for his two wickets this morning.