Gloucestershire 168 for 7 (Price 47, Charlesworth 45, Revis 3-26) trail Yorkshire 456 (Bean 164, Lyth 129, Singh Dale 3-70) by 288 runs
Gloucestershire fought back impressively with the ball at the start of day two - but Yorkshire maintained the advantage in the ongoing Vitality County Championship clash at Scarborough by striking five times late in the day.
Yorkshire, who started the day on 348 for three in their first innings, were bowled out for 456 when looking well set for many more. New-ball seamer Ajeet Singh Dale claimed two of the seven wickets to fall, finishing with three for 70 from 24 overs.
Despite their impressive morning's work - the hosts were bowled out on the cusp of lunch - Gloucestershire were still faced with a daunting total to reply to.
And while their response started encouragingly thanks to opener Ben Charlesworth's 45 and 47 for Ollie Price, they slipped from 128 for two to 158 for six and later ended the day on 168 for seven from 71 overs.
It was, without doubt, a morale-boosting close to a day which started poorly for a Yorkshire side who did not make the most of an opening partnership of 307 between centurions Adam Lyth and Fin Bean on day one.
This Championship campaign has been one of significant frustration for Yorkshire, who were billed as pre-season title favourites but came into this fixture second-bottom in the Division Two table and without a win in seven.
They have been affected by fast-bowling injuries and have struggled to bowl sides out as a result. In the games they managed to do that, they lost against Middlesex at Lord's and against leaders Sussex at Hove.
In some matches, weather has played its part in thwarting them.
Should they not get over the line here during the next two days, the weather will almost certainly not be a factor.
But their chances were increased thanks to a superb last hour, including two wickets in two balls for all-rounder Matthew Revis, who had earlier also removed Charlesworth en-route to three for 26 from nine overs.
Left-handed Charlesworth started the season batting at seven, contributing unbeaten scores of 52 and 43 to the draw against Yorkshire at Bristol in early April.
But he then replaced Chris Dent at the top of the order in early May and has a 126 to his name.
He fell caught behind off Revis's seam with the final ball of the afternoon, five short of a fifty - 97 for two. Jordan Thompson had earlier removed Cameron Bancroft.
England Lions man Price continued his good work and twice hit the off-spin of Dom Bess over midwicket and long-on for six. Though he was part of the late collapse.
Bess started it when he bowled an advancing Miles Hammond off an inside-edge shortly after tea before Sri Lankan overseas quick Vishwa Fernando bowled James Bracey - 146 for four in the 60th.
Revis then had Price brilliantly caught behind down leg by Jonny Tattersall off a gloved pull at the end of the 61st over. And when he bowled Australian Beau Webster, via inside-edge, for a golden duck at the start of his next, Gloucestershire were 158 for six in the 63rd.
Thompson returned to get Graeme van Buuren caught at first slip in the day's penultimate over - 166 for seven in the 70th.
Yorkshire were helped by the fact glorious sunshine had been replaced by cloud cover, and there was no doubt this was a bowler's day.
Gloucestershire were excellent with the ball before lunch, much improved from day one when they struggled to build sustained pressure.
They claimed seven wickets for 87, Yorkshire falling from 369 for three as new ball seamers Singh Dale and Dom Goodman struck twice apiece.
Glos pinched a second bowling bonus point just in the nick of time as Webster bowled Revis with a beauty five balls into the 110th over - 390 for six - while all-rounders George Hill and Thompson fell just short of fifties, posting 45 and 44 in contrasting fashion.
Hill was measured, whereas Thompson was meaty. The latter hit four sixes in 28 balls, the best of them coming over cover off Australian Webster's seamers.