Root, 81 not out at tea, spent 12 balls on 99 and one of the outstanding batsmen of his generation almost played onto Lahiru Kumara when one run shy of a century.
But Root, opening the face, elegantly guided the paceman for four between slip and gully to complete a hundred with his 13th four in 162 balls faced.
He was eventually out for 143, his sixth Test century at Lord's, when he miscued a reverse scoop off fast bowler Milan Rathnayake high to Pathum Nissanka at point, with England then 308-7.
By then, Root had drawn level with fellow former England captain Cook's record of 33 Test centuries, but in his 145th match compared to the retired opener's career tally of 161 Tests.
It also took the 33-year-old Root into joint-tenth place in an all-time list of Test century-makers headed by India great Sachin Tendulkar, who scored 51 hundreds in 200 Tests from 1989-2013.
Significantly, the 33-year-old Root is the only batsman in this group who is still an active cricketer, with all the others retired from Test duty.
Most Test hundreds (number of hundreds, matches, player, team (s), span):
51 200 Sachin Tendulkar IND 1989-2013
45 166 Jacques Kallis RSA 1995-2013
41 168 Ricky Ponting AUS 1995-2012
38 134 Kumar Sangakkara SRI 2000-2015
36 164 Rahul Dravid IND/ICC 1996-2012
34 118 Younis Khan PAK 2000-2017
34 125 Sunil Gavaskar IND 1971-1987
34 131 Brian Lara WIS/ICC 1990-2006
34 149 Mahela Jayawardene SRI 1997-2014
33 145 Joe Root ENG 2012 -
33 161 Alastair Cook ENG 2006-2018