Sergio Aguero's early opener was cancelled out by Ashley Young's close-range effort and United went in ahead at half-time after Marouane Fellaini's powerful header.
Juan Mata added a third after the restart and Chris Smalling also found the net before Aguero pulled one back at the death to make it 4-2.
Van Gaal said before the match that he and his players had been "dreaming" of beating their arch rivals for the first time since December 2012.
But this was a victory and performance that was surely beyond the United manager's wildest expectations.
Once United had levelled the scores, they out-performed the Barclays Premier League champions in every department.
Mata rattled City with his creativity and vision, Michael Carrick ensured the hosts played at a high tempo at the base of midfield and Ander Herrera had possibly his best game in United red.
But the best players on a pitch full of mega stars were Young and Fellaini
Van Gaal played down his role in United's revival before kick-off, but the Dutchman deserves huge credit for the way he has turned these misfits into two of the most deadly players in the top flight on current form.
Pablo Zabaleta, one of the league's most experienced and consistent performers, could not handle Young's pace all afternoon and Fellaini just bullied every player he saw in blue.
The result means United remain third in the table, four points ahead of City
The Red Devils are just one point behind Arsenal and eight shy of table-toppers Chelsea.
The biggest repercussions are likely to be felt across town
City boss Manuel Pellegrini was taunted with chants of "sacked in the morning" towards the end of the match, which brought to an end a run of four successive derby wins for the Blues.
Any hopes of retaining the title are now surely over for Pellegrini and the pressure on the Chilean is continuing to mount.
This fixture has thrown up some classics over the years - and the early signs were that this was going to be another.
Both teams went at each other from the first whistle on a typically wet and windy Mancunian afternoon.
City went into the match as underdogs after a miserable run of form, but the roles were reversed in the opening stages as they threatened to run riot, dominating possession and attacking at every opportunity.
Jesus Navas raced through on goal following Martin Demichelis' punt over the back four, but the Spaniard was denied by his compatriot David de Gea, who raced off his line to block.
Smalling denied Aguero from the resulting corner and then it was Carrick's turn to put in a last-gasp tackle to deny Yaya Toure.
When the opening goal came in the eighth, City made it look easy
James Milner drifted in from the left flank, slipped the ball in to David Silva and he squared to the unmarked Aguero, who tapped in from close range.
The goal woke United from their slumber
They threw everything at their opponents and six minutes later they were level.
De Gea, under pressure from Aguero after a short backpass from Phil Jones, booted the ball to the left wing where Herrera whipped the ball into Young
Gael Clichy blocked Young's first attempt, but the winger swept the ball in at the second attempt.
The Stretford End was rocking
They demanded another and United looked destined to give it to them.
Herrera buzzed around the pitch, causing City no end of problems, Fellaini was over-powering Toure in the middle and Mata sprayed a series of deft passes around the park.
The former Chelsea midfielder started off the move that led to United's second
Mata fired a 40-yard ball across the field to Young, who backheeled the ball to Daley Blind
He returned the ball to the former Aston Villa player, who whipped in a ball to the back post where Fellaini headed past Joe Hart after out-jumping Clichy.
United continued to pile on the pressure before half-time, but they did not have it all their own way
Aguero broke through just before half time, but Antonio Valencia sprinted across the pitch to tackle the Argentinian while Silva was unmarked in the box.
Kompany joined Silva in the book for wiping out Blind.
The City captain did not emerge after the restart
He was replaced by Eliaquim Mangala.
The match continued at the same breakneck speed after the break
Hart denied Rooney his 12th Manchester derby goal with a diving save from his free-kick and Carrick's rebound was blocked.
City were all over the place at the back and it was only a matter of time before United scored their third.
It came when Mata slipped in behind the City defence after a through-ball from Rooney and he slipped the ball under Hart.
Smalling then put the victory beyond any doubt when he nodded in Young's cross from a free-kick.
There was just enough time for Aguero to pull one back, but there were no celebrations from the visitors
They knew that they had already been soundly beaten.
Source : PA