Lyth hit two sixes and 13 fours in his 116 not out and shared a third-wicket stand of 150 with skipper Andrew Gale.
Gale's 61 was his highest score of the season, but he fell to Tom Curran as his side closed on 207-3, 60 behind.
Earlier on day three, Sam Curran (59*) and Steven Davies (56) helped Surrey add 103 to their overnight 164-5.
With the best part of four sessions lost to rain on the first two days, a draw is now the most likely result, but having begun the game in fifth place, Yorkshire will have set their sights on reaching 400 to ensure they leave the Oval with maximum bonus points.
After Davies and the younger Curran added 75 for the seventh wicket, Surrey lost their last four for 28 in the space of 10 overs.
Alex Lees departed in the eighth over of Yorkshire's innings and Jack Leaning followed for a duck when he chopped Stuart Meaker's first delivery into his stumps.
Lyth, though, was unperturbed as he progressed to three figures off 159 balls and partner Gale, who started the match averaging only 17.93, grew in confidence to reach his first half-century of the summer before he was caught behind.
Surrey all-rounder Sam Curran told BBC Radio London:
"It was nice to finally get back into the side after school and stuff, to get some time in the middle.
"They showed they are one of the top teams in the division and I had a good battle with Adil Rashid, a good spinner, he really made me work on my feet.
"It's been frustrating. Both teams wanted four days (of play) because we're both looking for wins.
"Tomorrow we're going to have to come in quite hard with the ball, see how many wickets we can take in the first session and see where we can take it from there."

The Alliance for National Parks Cymru, which includes a number of conservation bodies, said it risks diminishing their international standing.
The Future Landscapes Wales (FLW) report has been produced by a group under the chairmanship of Lord Elis-Thomas, who refused to comment.
The Welsh Government said discussions were ongoing on the final report.
The RSPB and Welsh Wildlife Trusts (WWT) said they could not support the report in its current form.
Both bodies said there was much to support in the document, but added "we must convey how disappointed we are by the report".
The FLW working group was set up by the Welsh Government in 2015.
The RSPB and WWT said the report contained no clear proposals, and displayed a lack of acknowledgement on the urgent need to address the loss of biodiversity within protected landscapes.
The report - which was due to be published a fortnight ago but will now be unveiled at a later date - was seen by BBC Wales' Newyddion 9.
It states that "its desire is to unlock the full potential of all landscapes in Wales" and national parks and areas of outstanding natural beauty have a pivotal role to play in the future prosperity of the country.
It calls on more collaboration to create employment opportunities and says "communities need to be inspired to develop their own vision and long-term goals for the future to generate employment and create opportunities for young people to stay in and return to their communities".
But conservationists said they were concerned the report makes no mention of the "Sandford Principle" which states the main statutory purpose of national parks is to conserve and enhance the natural beauty, wildlife and cultural heritage of the area.
A Welsh Government spokesman said: "It is important to remember this is a draft version of the report.
"The Future Landscapes Wales Programme has been highly collaborative in nature and has involved a wide range of partners, who have contributed to the discussions and the drafting.
"These discussions are ongoing as a final report is prepared for publication before the summer recess."
Yorkshire opener Adam Lyth made his third century of the season as the defending champions replied solidly to Surrey's 267 all out at the Oval.
[NEXT_CONCEPT]
A draft report on the future of the Welsh national parks has been criticised by conservationists.