The visiting side were 558-4 at lunch on the fourth day Wednesday in reply to Bangladesh's 197, 361 ahead with six wickets in hand.
Gillespie was on 186 with 24 fours and two sixes off 407 deliveries as Australia plundered runs at will in the morning session after resuming on 364-3. Michael Clarke (16) was the other not out batsman.
Gillespie, who had completed his maiden ton on Tuesday, batted on with ease and his fourth-wicket stand with Hussey (182) was worth 320.
Gillespie, 102 overnight, broke the world record for the highest score by a nightwatchman. The previous mark was held by Tony Mann (105) of Australia against India at Perth in 1977.
Hussey got to his fourth century in 11 Tests with a drive through covers off paceman Shahadat Hossain and surpassed his previous highest of 137 against the West Indies in Hobart last year.
Hussey, 93 overnight, smashed 21 fours and a six off 203 balls before holing out to Hossain at the square-leg fence off part-time seamer Aftab Ahmed in a bid to step up the run-rate.
Australia won the first game in the two-Test series by three wickets.