Australia were 114-1 at tea with opener Mathew Hayden (44) and captain Ricky Ponting (30) batting steadily after the visiting side bowled out Bangladesh for just 148 in their second innings.
Australia, who suffered a batting collapse in the first innings, batted cautiously Wednesday on a tricky pitch, with Hayden and Ponting adding 50 runs after Michael Hussey (37) dominated an opening partnership of 64.
The left-handed Hussey had looked set for a big score but played-on trying to sweep Bangladeshi spinner Enamul Haque.
Bowlers Shane Warne and Jason Gillespie led the Australian fight back on day four as the world's top side battled to retain their unbeaten record against the Test minnows.
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 on Wednesday morning.
Paceman Gillespie struck the first blow when Khaled Mashud (zero) was bowled offering no stroke to a ball that nipped back sharply.
Gillespie also dismissed the other overnight batsman Rajin Saleh (33) before leg-spinner Warne grabbed three quick scalps after going wicketless in the match so far.
Warne exacted his revenge on Mohammad Rafique, trapping the left-hander leg-before after being whacked for three fours in the previous over, and then bowled Mashrafe Mortaza with his next ball.
Last man Haque (zero) was also trapped leg-before by the world's leading wicket-taker as the home side lost the initiative with an all-too familiar second-innings collapse.
Warne and Gillespie finished with three wickets each, Gillespie conceding just two runs for his two wickets on Wednesday morning.