But Shiv Chanderpaul then led the Red Rose rearguard action at Headingley, as he made an unbeaten 43 in partnership with Dane Vilas to help the visitors close on 141-4, just nine in arrears.
Lyth hit a round 100 as Yorkshire posted 273, Jordan Clark and Saqib Mahmood each taking three wickets.
But, after another failure for England opener Haseen Hameed, Lancs rallied.
Lyth's 22nd career first-class century, his first in the Championship since last September, was his third in this fixture, but a long way short of his career-best 251 at Old Trafford in 2014.
After resuming on 93-2, with help from captain Gary Ballance (28) and Jack Leaning, Lyth looked set to steer Yorkshire to a much bigger score on 178-3.
But they lost their last seven wickets for only 95, Lancashire being held up at the end when Jack Brooks, fresh from his record-breaking ton from number nine in the last Roses match at Old Trafford just a fortnight ago, threatened to do more damage.
This time, however, after putting on 24 with last man Ryan Sidebottom, he had made just 18 when he was caught at deep backward square-leg by Hameed off Tom Bailey.
After losing fellow opener Alex Davies cheaply, Hameed then went for 10 - to continue the bad trot which has brought him just 26 runs in his past six Championship innings.
Luke Procter (23) and visiting skipper Steven Croft (27) both offered dogged resistance before Chanderpaul and Vilas (22 not out) joined forces to give their side hope.
Lancashire, without the injured Jimmy Anderson, were further weakened without Liam Livingstone, who was summoned for England Lions against South Africa A. And he impressed with his maiden List A century - a blistering 129 from 83 balls at Wantage Road, Northampton.
Yorkshire's Adam Lyth told BBC Radio Leeds:
"I'm very pleased with how it's gone for me in this game. I was delighted to get a hundred in tough conditions against a good attack. The next ball, I was disappointed to get out.
"But, if we can get a couple of early wickets tomorrow, we can drive it home and win.
"I've had a tricky few games opening the batting, but I'm really pleased to get a hundred in a Roses match and hopefully in a match-winning performance as well."
Lancashire's Saqib Mahmood told BBC Radio Manchester:
"It was a difficult day. We got shafted a bit after winning the toss and batting. Today was about bowling them out as quick as we could and not letting them get too far ahead.
"If we went bang, bang this morning we were right in the game. It was a case of going hard at them. We stuck with it and got the rewards and the back end of the session.
"They ended up with a 150-0run lead. All we had to do after that was bat well. There's still plenty of time left in the game, and we'll see what happens."

One device was listed with a previous sale price of £2,378, but was "reduced" to £1.58.
The computer firm briefly took its UK store offline on Saturday to resolve the error, and said it would not honour the sales that had been made.
"We apologise sincerely to impacted customers for any inconvenience caused," the firm said in a statement.
Over the weekend, a handful of people posted on social media that they had taken advantage of the mistake and ordered laptops.
But according to consumer rights group Citizens Advice, retailers can often cancel online orders if they have made a "genuine and honest mistake on their part that you should have noticed".
HP said buyers would be refunded.
"We can confirm that due to a processing error, select products were wrongly priced on our UK website over the weekend," HP said.
"This has now been corrected with related orders cancelled."
Adam Lyth's third century in a Roses Match helped earn Yorkshire a 150-run first-innings lead against Lancashire.
[NEXT_CONCEPT]
HP has apologised after an error on its website let shoppers buy expensive laptop computers for less than £2.