Warnock turned 58 on Friday and marked seven years in charge at Bramall Lane on match day, but Andy Reid's first-half opener looked set to spoil the party.
Warnock watched his side waste countless chances before captain Chris Morgan conjured up a 64th-minute equaliser and Gillespie volleyed home an 88th-minute stunner to give the Blades a second win in five days.
After beating Watford 1-0 on Tuesday, Warnock's men are now clear of the relegation zone, leaving Charlton still rooted to the foot of the table and stretching their miserable away run in the Premiership to 22 games without a win.
In truth their display did not merit a point and they can count themselves fortunate they were not trounced as United initially struggled in front of goal.
They should have been a goal up after just 35 seconds when Stephen Quinn, on his Premiership debut with elder brother Alan injured, rifled in a left-foot volley which Scott Carson clawed round the post.
After Christian Nade curled a left-foot shot wide, Rob Hulse then missed the first of his two chances which went begging before the interval.
Morgan flicked a long throw from Leigh Bromby into the area but leading scorer Hulse, with four to his name this season, headed narrowly wide with the goal at his mercy.
Then against the run of play Charlton opened the scoring as United fell asleep in the 17th minute.
Reid seized control of the ball and surged towards the edge of the area before playing in a wide-open Darren Ambrose to his left.
Ambrose dawdled over his shot, allowing Rob Kozluk to slide in, but he mis-timed his tackle and gave the striker the opportunity to score.
Although Paddy Kenny made a superb save to deny Ambrose, Reid was on hand to side foot home the rebound from five yards, leaving Kenny to launch a broadside at his defenders.
Undeterred, Warnock's side continued to pour forward, making the Addicks look every inch a bottom-of-the-table team.
Hulse was agonisingly close in the 31st minute, juggling the ball just inside the area before hooking goal wards a left-foot half-volley which Carson tipped over from underneath his own bar.
Four minutes later Hulse headed inches wide a dinked cross from Phil Jagielka after a quickly taken free-kick from Bromby.
After Charlton captain Luke Young bravely threw himself in the way of a rasping drive from Quinn soon after, a Charlton break almost caught United snoozing again minutes before the interval.
This time it was Darren Bent who embarked on a run, with Ambrose again the grateful recipient only to drive his shot into the welcoming arms of Kenny.
After Hulse finished the half with a drive narrowly wide, it was agonisingly more of the same after the break.
Morgan, Hulse and Derek Geary - the latter inexplicably directing a free header across the edge of the six-yard box with the goal gaping - adding to the rising exasperation levels inside Bramall Lane.
After Reid turned aside a drilled close-range volley from Morgan, it was the United skipper who finally levelled matters.
From Gillespie's outswinging corner, centre-back Morgan towered above his markers to power home a header for his first goal since the final day of last season.
A draw then looked on the cards but with just over two minutes remaining Djimi Traore's attempt at a clearance ballooned into the air to Gillespie who thundered a 20- yard right-foot volley beyond Carson.