But centre-half Barker finished more like a striker after the break to peg the hosts back with his fourth goal of the season.
Rangers came agonisingly close to snatching the win when Rowan Vine rattled the woodwork late on, but the Rams escaped with a valuable point.
Both these teams will not be sorry to see the back of disappointing seasons but they are making heavy weather of dragging themselves clear of the bottom three - Rangers have not won in four and Derby in five.
Nigel Clough will not be relaxing just yet but his side now have a handy six-point cushion while QPR lie a point and a place better off.
Yet Clough's side could have been two down in the opening five minutes but for goalkeeper Stephen Bywater, who dived low to his left to keep out Jay Simpson's shot before tipping a fierce angled drive from Matt Connolly over the top.
The visitors hit back with Rangers keeper Carl Ikeme saving from Barker's header and holding onto a curling free-kick from Robbie Savage.
The set-piece made a welcome change for Savage, who spent the rest of the first half man-marking Rangers playmaker Adel Taarabt, snapping away at the Moroccan's heels, chirping in his ear and generally irritating the home crowd in his own inimitable style.
However, in stoppage time, Taarabt finally escaped the Welshman's clutches and played a diagonal ball to Cook.
The winger, who has been beset by injuries for the best part of three years, was left with far too much room to lash his shot inside Bywater's near post with the last kick of the half.
Rangers had a let-off six minutes after the break when Chris Porter was robbed by Damion Stewart as he shaped to tap in from six yards.
But Derby did draw level in the 67th minute when Rangers failed to deal with Savage's high free-kick into the area and Barker was on hand to lash the loose ball through a crowd of defenders and past the helpless Ikeme.
Rangers had the better chances to win it with Taarabt and Alejandro Faurlin both firing narrowly wide, before Vine crashed his shot against the crossbar with five minutes remaining.