Taylor, nipping one back to peg him leg before.
Williams began swiftly galloping to 36 from just 36 balls. He slowed slightly to reach his third Test half-century and found a handy partner in Raza.
Together they added 159 for the fifth wicket as the Sri Lankans struggled to plug the gaps in the field. The breakthrough came when Raza, on 72, miscued a pull off Embuldeniya and dollied up a catch to Angelo Mathews at long-on.
Williams went on to bring up his second Test century - his first was against New Zealand in Bulawayo four years ago - by sweeping Embuldeniya for four.
He gave it away in the next over, however, when he attempted to slog a straight ball from Dhananjaya de Silva over midwicket and was bowled.
Sri Lanka took the new ball immediately but were unable to make further inroads as Chakabva and Mutombodzi batted watchfully through to the close.
The visitors had begun the day well with Lahiru Kumara finding the edge of Masvaure’s bat for nine before Irvine nudged De Silva to short leg where Oshada Fernando snapped up a sharp catch.
Zimbabwe made two changes to the side that lost the first Test with Carl Mumba replacing the injured Kyle Jarvis and allrounder Mutombodzi, who bowls leg-spin, coming in for his Test debut ahead of Ainsley Ndlovu.
Sri Lanka made one change with left-arm pace bowler Vishwa Fernando coming in for Kasun Rajitha. Sri Lanka lead the two-Test series 1-0.