Super-sub Van Nistelrooy sinks Stuttgart
The Dutchman entered the fray in the 65th minute with the score at 1-1 and struck twice in a three-minute spell to hand Stuttgart their first defeat under former Tottenham Hotspur coach Christian Gross.
Bayer Leverkusen and Bayern Munich stayed level on points at the top after winning at home. Both have 48 points from 22 games but the former lead on goal difference.
Unbeaten Leverkusen overcame champions VfL Wolfsburg 2-1 while Bayern beat Borussia Dortmund 3-1, their 12th straight victory in all competitions.
German Cup holders Werder Bremen ran riot at Hanover 96, scoring four first-half goals in a 5-1 win.
Hamburg, who have suffered a catalogue of injuries to their forwards this season, took a 23rd-minute lead through Marcus Berg but Christian Traesch levelled 10 minutes after half-time.
Former Manchester United and Real Madrid forward Van Nistelrooy, who made his debut as a 90th-minute substitute against Cologne a week ago, then changed the game.
Ten minutes after he came on Marcell Jansen headed the ball into Van Nistelrooy's path and he tapped the ball home at the far post.
The Dutchman added his second when he sidefooted past keeper Jens Lehmann from 10 metres after good work by Berg.
"I was watching the time and I could see the minutes ticking away," said Van Nistelrooy, whose team are nine points behind the leaders in fourth place.
"It was of course great to come on and score twice especially as the goals gave us the win."
Leverkusen, who dropped two precious points at VfL Bochum last week, were given a helping hand by hapless Wolfsburg goalkeeper Andre Lenz.
First he failed to hold a Toni Kroos free-kick, allowing Stefan Reinartz to lob the ball into the net in the 48th minute.
Having atoned with two fine saves, the goalkeeper then put through his own goal when Eren Derdiyok's header struck the crossbar and bounced off his foot and over the line.
Bosnia forward Eden Dzeko pulled one back with his 10th league goal of the season but could not stop Wolfsburg going 12 games without a win in all competitions, leaving them 13th and just eight points clear of the relegation playoff place.
Bayern had to come from behind, Egypt forward Mohamed Zidan giving fifth-placed Borussia the lead before Mark van Bommel levelled.
Dutchman Arjen Robben put Bayern ahead five minutes after the restart with his eighth league goal of the season and Mario Gomez added another midway through the second half.
Peter Niemeyer and Brazilian defender Naldo put sixth-placed Werder 2-0 ahead at struggling Hanover inside 20 minutes before Leon Andreasen put through his own goal and Aaron Hunt added a fourth in the 44th.
Although Christian Schulz pulled one back, Peru forward Claudio Pizarro volleyed a fifth for the visitors with his ninth league goal of the season.
Colombia striker Adrian Ramos headed in early in the second half to give bottom club Hertha Berlin a 1-1 draw at home to Mainz, who had taken a first-half lead through Aristide Bance.