The left-handed opener was unbeaten on 117 at the break with Younis Khan (14 not out) as the tourists added 130 runs to their overnight total of 87-1 after a delayed start due to fog.
The pair have so far put on 67 for the unbroken third-wicket stand.
Umar was also involved in a 127-run stand for the second wicket with Azhar Ali (57), who hit seven fours in his 12th half-century in 18 Tests before falling in the second session.
Umar, 44 overnight, completed his second Test hundred against Bangladesh when he cut off-spinner Mohammad Mahmudullah for a four.
He played some aggressive shots after reaching his century, driving left-arm spinner Elias Sunny through the covers for successive boundaries. He has so far hit 16 fours in his 220-ball knock.
Bangladesh had a chance to dismiss Umar on 56, but wicket-keeper Mushfiqur Rahim did not even try to effect a stumping off left-arm spinner Shakib Al Hasan while confidently appealing for a catch down the leg-side.
Umar was lucky to survive on 66 when he cut the first delivery after the lunch break off paceman Robiul Islam, but Mohammed Nazimuddin dropped an easy catch at gully.
Bangladesh, who went wicketless in the opening session, got their first wicket in the fourth over after lunch when Shakib had Azhar caught behind with a delivery that turned away sharply.
Shakib was the most impressive bowler, conceding just 28 runs in his 18 tight overs.
Azhar, who hit fast bowler Shahadat Hossain for two fours in the opening over of the day, reached his half-century with a boundary off Sunny in the last over of the morning session.
Pakistan lead 1-0 in the series after winning the opening Test in Chittagong by an innings and 184 runs