At the interval, paceman Gillespie and Mike Hussey were unbeaten on 102 and 93 respectively, extending their partnership to 154 runs in the second session which was extended by 32 minutes after rain had delayed the start.
The tourists, who won the first of the two-match series by three wickets last week, stretched their lead to 167 after dismissing the home side for 197 on the opening day.
Gillespie faced 300 balls hitting 17 boundaries to register his highest test score, eclipsing his 54 not out against New Zealand in November 2004.
One day before his 31st birthday, Gillespie batted with supreme confidence and capitalised on two missed chances by the hosts to reach three figures.
Mohammad Rafique, who removed the openers, was unlucky not to claim a third scalp when keeper Khaled Mashud dropped Gillespie on 44.
He was spilled a second time on 60 by Abdur Razzak at gully off the bowling of paceman Shahadat Hossain.
Resuming on their overnight score of 151-2, Gillespie and Ricky Ponting continued to bat solidly as their third-wicket partnership reached 90, before the skipper was run out on 52 from a direct hit by Abdur Razzak, fielding at gully.