Left-hander Tamim was unbeaten on 74 after Mahmudullah made 56. Bangladesh skipper Mushfiqur Rahim had won the toss and elected to bat.
At stumps, Shakib Al Hasan was keeping Tamim company on 13.
The usually aggressive Tamim played a dour innings and took 169 deliveries to reach 50, the slowest of his 17 Test half-centuries.
He has so far hit six boundaries during his 250-ball knock, which was marked by a 95-run stand for the third wicket with Mahmudullah.
Also Read
Panyangara, who had earlier taken a return catch to dismiss Mominul Haque (35), ended the day with two for 29 from 19 overs.
Tamim and Mominul put on 72 for the second wicket after Zimbabwe removed opener Shamsur Rahman, leg-before to Elton Chigumbura, for two in the eighth over.
Shamsur was initially declared not out, but Zimbabwe used the Decision Review System to get the verdict in their favour.
Bangladesh lead the three-match series after a three-wicket victory in the first Test in Dhaka last week.
Zimbabwe handed Test caps to batsman Brian Chari and leg-spinner Natsai M'shangwe.
The third Test will be played in Chittagong from November 12-16.
Zimbabwe's tour will also feature five one-day internationals.