Gillingham 0 Doncaster Rovers 2
Price headed home Stock's corner in the 81st minute as Gillingham pressed before Stock blasted home a second goal two minutes from time.
Rovers made four changes to the side that beat Darlington in the Football League Trophy in midweek, while Gillingham welcomed back defender Ian Cox from suspension in place of Duncan Jupp.
Rovers, on a run of seven wins in nine games, began strongly, but after James Coppinger wasted two decent opportunities in the opening five minutes, Gills' skipper Michael Flynn flashed a volley just wide in the 16th minute.
Doncaster began to control matters and midway through the half Paul Heffernan narrowly shot wide following a mistake by Gills' keeper Dean Brill before heading straight at the keeper from Jonathan Forte's cross.
Matt Jarvis was proving a threat with his pace for Gillingham and, in the 30th minute, latched onto Bas Savage's neat pass only to direct his shot inches wide of Benjamin Smith's far post.
But as the half drew to a close Heffernan again failed to hit the target, heading over from six yards following a bright move involving Forte and Coppinger.
The second half began at a frenetic pace as Gillingham burst forward with zeal and imagination. Flynn saw his free-kick tipped over before Clint Easton's corner forced a goalmouth scramble that Gillingham's players felt the ball had crossed the line in.
In the 67th minute Jarvis beat James O'Connor and rolled his cross across goal but the onrushing Mark Bentley could not convert the chance at the far post.
But nine minutes from time Stock swung over a well-directed corner and Price rose unmarked at the far post to head Doncaster in front against the run of play.
And with time running out, Stock settled matters in style, rifling home an unstoppable effort from 20-yards to seal another three points for Sean O'Driscoll's men.