At stumps, England were 318 for three, after a day where extraordinary off-spinner Muttiah Muralitharan, in his first Test at Lord's, had been the main brake on their progress with two for 69 at the start of this three-match series.
Trescothick, who missed the 1-1 drawn Test campaign in India earlier this year for personal reasons, made 106.
But Alastair Cook, in sight of becoming only the eighth batsman to score a century on his away and home Test debuts, fell for 89 shortly before the close.
Kevin Pietersen, 'caught' off a Maharoof no-ball was 54 not out and nightwatchman Matthew Hoggard unbeaten on two.
England resumed after tea on 199 for one with Trescothick 95 not out and Cook unbeaten on 44. The two men had batted through the entire second session after Andrew Strauss, the third left-hander in England's top three, fell for 48 to the last ball before lunch, caught by Sri Lanka captain Mahela Jayawardene off Murali.
Trescothick, the only player aged over 30 in a youthful England side, swept a single off Murali in the second over after tea to go to a hundred in 171 balls with one six and 15 fours.
It was his 14th Test century, third against Sri Lanka and second at Lord's, in an innings lasting over four hours.
But six runs later he too fell in near-identical fashion to Strauss, trapped by the same combination that had dismissed his fellow opener, after he too pushed forward tentatively.
Pietersen got off the mark with an extra-cover driven four against left-arm quick Chaminda Vaas but was lucky to survive a confident lbw shout from the bowler next ball, replays suggesting the delivery had pitched on line and would have hit.
Sri Lanka took the new ball with England 275 for two but Pietersen carried on to a 61-ball fifty with nine fours.
But on 52 he holed out off Maharoof to Jehan Mubarak at extra-cover only for the bowler to have sent down his 11th no-ball.
Cook had scored a century as an opener on his Test debut against India in Nagpur in March and was on course for another when an edged cut off Maharoof was taken by wicket-keeper Kumar Sangakkara to leave England 312 for three.
Cook faced 184 balls in nearly four hours with 11 fours, putting on 99 for the third-wicket with Pietersen after Trescothick's return meant the Essex fledgling had gone in at the unusual position of number three.
Earlier, Trescothick, 30 not out at lunch, went to his fifty in grand style with a swept six off Muralitharan.
At the toss Andrew Flintoff, continuing as England captain in the ongoing absence of Michael Vaughan with a knee injury, chose to bat despite the fact that no Sri Lankan had made a fifty in the team's final warm-up match, a 10-wicket defeat by England A, last week.
However, in what was the earliest Test ever played in England and the home side's first on their own turf since they regained the Ashes last year, blue and sunny skies promised ideal batting conditions.
Vaas and Maharoof lacked menace, as did first-change Kulasekara.
And, with no sign of a breakthrough, Muralitharan was brought on shortly before lunch.
His first ball just missed Strauss's off-stump and he was unfortunate to see Trescothick, on 28, survive a confident lbw appeal.