The hosts took eight wickets in the morning session on day three to reduce Somerset from 44-2 overnight to 155 all-out.
Ryan Sidebottom and Steve Patterson each finished with three wickets, while Tim Bresnan and Jack Brooks took two wickets apiece.
Yorkshire need only to avoid defeat against Middlesex at Lord’s next week to clinch the Championship.
Beneath overcast skies, Yorkshire did not make the best start as Somerset scored 43 without loss in the first nine overs, including eight boundaries.
However, the introduction of Patterson did the trick as he had Tom Cooper caught behind for 28, ending a stand of 77 in 24 overs with James Hildreth.
Hildreth went to fifty from 71 balls with nine fours before Somerset lost their fourth wicket at 105 when Jim Allenby was caught at third slip by Aaron Finch off Patterson for 12.
Hildreth went with the score on 111, caught at second slip by Adam Lyth off Jack Brooks for 57, made from 77 balls with 10 fours.
Boundaries still came at regular intervals, Peter Trego twice cracking Patterson through the offside as Somerset correctly decided that attack was the best form of defence.
But Trego carried it too far when he followed one from Patterson and was caught behind for 13, leaving Somerset 137-6 and deep in the mire.
Sidebottom got in on the act when he had Luke Ronchi caught behind for 22 before bowling Craig Overton for four.
Somerset fell to 154-9 when Tim Bresnan had Lewis Gregory caught at second slip by Lyth for two, Bresnan finishing the job when Tim Groenewald was caught at point by Gary Ballance.
Yorkshire: Lyth, Lees, Ballance, Gale, Bairstow, Finch, Bresnan, Middlebrook, Patterson, Sidebottom, Brooks.
Somerset: Trescothick, Cooper, Hildreth, Allenby, Leach, Ronchi, Trego, Overton, Gregory, Groenewald, Abell,