Taufiq, who was dropped twice, hit 130 before paceman Nazmul Hossain broke through with the second new ball as the home side toiled for a wicket.
Shahriar Nafees took the catch at slip to end Taufiq's gritty innings that included 16 fours.
Former captain Younus Khan was unbeaten on 48 alongside skipper Misbah-ul Haq (26 not out) with Pakistan needing another 47 runs to overhaul Bangladesh's first innings total of 338.
The home were left ruing missed chances with three catches spilled.
Nazimuddin dropped Taufiq in the gully off the bowling of Robiul Islam with the first ball after the lunch break while Nafees grassed another catch at short-leg off Elias Sunny with Taufiq on 118.
Shahadat Hossain also put down Younus Khan off Nasir Hossain at midwicket when he was on 15.
The hosts made their only other breakthrough of the day when Azhar Ali fell in the second session after the morning's play was delayed by heavy fog.
Ali had shared a 127-run stand with Taufiq when he was caught behind by wicketkeeper Mushfiqur Rahim off the bowling of spinner Shakib Al Hasan for 57.
Pakistan lead the two-match series 1-0 after a innings and 184-run victory in the first Test. (Reuters)