United led through an early header from Paul Scholes but Grant Holt levelled seven minutes from time before Giggs had the last laugh to keep the champions two points behind leaders Manchester City who beat Blackburn Rovers 3-0 on Saturday.
"For Ryan to score the winning goal with the last kick of the ball in his 900th game, he probably deserves that for the career he's had," smiled United manager Sir Alex Ferguson.
Spurs are third on 53 points but endured a miserable day after taking a 2-0 lead at their arch-rivals before Arsenal scored five times in 28 minutes.
Louis Saha put Spurs ahead in the fourth minute and ex-Arsenal striker Emmanuel Adebayor doubled the lead with a 34th- minute penalty.
Arsenal were level by half-time thanks to goals from Bacary Sagna and Robin van Persie, who took his season's tally to 29. The Gunners then added three more in the second half with Theo Walcott scoring twice and Tomas Rosicky grabbing the other.
Arsenal, whose comeback came before Scott Parker's late red card for Spurs after a second yellow for a late challenge on Thomas Vermaelen, ended the day in fourth place on 46 points, above Chelsea having scored more goals.
The 38-year-old Giggs, who made his United debut in 1991, ended yet another milestone day in his glittering career by converting a cross from Ashley Young to lift the champions to 61 points, two behind City with 12 matches to play.
"It was obviously a special moment, to score late on is always nice and to get the winner is a bonus," Giggs told reporters.
"To play 900 games for the club I have grown up supporting is special, it's a great day for me and I am sure there will still be plenty of twists and turns in this title race."
Scholes, who first played with Giggs in a United side 17 years ago and has been in superb form since ending his premature retirement last month, headed home Nani's cross for the first goal.
It was also a day to remember for Arsenal, whose erratic form all season meant Spurs were in the unusual position of starting a derby as the favourites.
It seemed as though the pundits had got it right when they went ahead with a Saha goal after good work by Adebayor exploited huge gaps in the Arsenal defence.
Adebayor then became only the second player, after Jimmy Robertson in the 1960s, to score for both Arsenal and Spurs in the derby when he converted from the spot after Gareth Bale was brought down by goalkeeper Wojciech Szczesny and Kieran Gibbs.
Arsenal responded superbly. Sagna scored their first with a bullet header moments after Van Persie had hit a post and the Dutchman then equalised with a superbly taken curling shot.
Rosicky put the home side in control early in the second half and Arsenal dominated the rest of the game with Walcott turning the first half jeers from the home fans to cheers with two well-taken goals.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.