Resurgent Latham inspired by 'world-class' Williamson
After the hosts wrapped up Sri Lanka's innings for 282, Tim Southee taking the final wicket to finish with figures of 6/68, the Kiwi top order batted their team into a position of dominance, reaching 311/2 at stumps.
Latham scored 121*, his seventh Test hundred, and shared an opening stand of 59 with Jeet Raval (43) before the latter's dismissal brought Williamson to the crease.
The Black Caps skipper was in imperious form, hitting a stylish 91 from 93 balls as part of a second-wicket partnership of 162 with Latham before falling to the part-time off-spin of Dhananjaya de Silva.
Latham said the manner in which Williamson played helped take the pressure off him at the other end, as he brought up his first Test century since January 2017.
"Kane came out and hit the ball fantastically well," said Latham. "I guess he's a world-class player and is hitting the ball unbelievably well in all conditions.
"You look at some of the shots he plays – from ball one – those early boundaries set the tempo for his innings and he kept doing that. He's a fantastic player and one to get a few more tips off. When guys are going like that it's almost easier to give them the strike and let them do their thing.
"At the start of my innings, I wasn't playing that quickly, but the way Jeet Raval played and the way Kane came and played – that took the game to the opposition and kept the scoreboard ticking over. It was good for me. I could just keep going. The most important thing we talk about was making those partnerships big ones, and I managed to get a good one with Kane."
Latham will resume his innings on day three, hoping to further banish memories of a disappointing recent series in the UAE against Pakistan where he averaged 16.5 across the three Tests.
"I didn't have the results I wanted in the UAE, but I felt like I was hitting the ball alright," added the left-handed opener. "The biggest thing was the trust in my own game, and the trust that I can do it at this level. It's been a while since I made a big score, but it was nice that I managed to do that straightaway."