Williamson suffered the injury to his left shoulder region when diving in the field on Sunday, and batted through the pain for 162 minutes for 74 in New Zealand's innings of 432-6 declared.
With Williamson, he guided New Zealand to 38-2 at stumps on the third day, then continued to lead the home team's innings in hard batting conditions at the start of the fourth day.
The first two days were washed out, but clean weather is forecast for the remainder days. Taking risks, he was twice dropped on 20 in the same over from Ebadot Hossain, first at cover by captain Mahmudullah, then at slip by Shadman Islam.
The New Zealand board took to twitter to inform about the skipper's injury, "Injury update: Kane Williamson will not return to the field today as he rests his left shoulder ahead of further investigation (MRI scan) tomorrow morning".
New Zealand's captain is an unlikely starter in the third cricket test against Bangladesh in Christchurch on Saturday, but the nature of his grade one pectoral muscle tear means they're yet to rule him out.More news: Failure to designate Masood Azhar as global terrorist against regional stability, peace
More news: Full house star Lori Loughlin arrested for bribery
More news: Facebook Messenger DOWN: WhatsApp rival NOT WORKING as users report issues
"I think we all saw how green it was and we wanted to be positive because we knew there was probably going to be a ball with your name on it", Taylor said.
Taylor, the only top-order New Zealand batsman to fail in the first Test, was in a particularly aggressive mood with boundaries off the first two balls he faced.
Taylor's double century came from 211 balls, the third-fastest in tests by a New Zealander.
Boult came back to destroy the tail with three wickets in nine balls.
Wagner then dismissed Mohammad Mithun and Liton Das shortly after, reducing Bangladesh to 158/6 and still trailing the Black Caps by 63 runs.