There can be little doubt Ralf Rangnick's in-form Reds deserved their win but for so long it looked as if David Moyes Hammers - themselves enjoying a fine season - would not only keep us out but stay above us in the table.
That was until substitutes Edinson Cavani and Rashford linked up for a late, late, headline hitting finish as the former found the latter to tap home in the final seconds to put United fourth, a point and a place above our opponents with a game in hand.
Buoyed by the midweek win at Brentford, our best performance under the interim German boss so far, Rangnick made only one change from the trip to the capital as the fit again Harry Maguire returned in lieu of Victor Lindelof, supporting his family after a break in during the game at Brentford.
Mason Greenwood was crowded out having been found by Bruno Fernandes and then the lively Jarrod Bowen was impressively thwarted by the returning skipper Maguire.
Fernandes and Cristiano Ronaldo had linked up for the second goal against the Bees and the two Portuguese schemers almost did so again when Fernandes whipped in a teasing ball but CR7 narrowly failed to make contact and the ball flashed wide.
Ronaldo saw a penalty shout go begging when he was bundled over by Kurt Zouma nine minutes before the break but referee Jon Moss and his assistant Paul Tierney were unmoved.
Scott McTominay snuffed out a Hammers raid at source as the visitors threatened a breakthrough shortly before the break.
Alphonse Areola was finally called into action to deny Fred, as the stand-in stopper pushed away the Brazilian's rasping drive from close range.
Bowen slammed into the side netting and Raphael Varane sent a header over the bar at the other end before Anthony Elanga dragged wide as he attempted to open the scoring, just as he did at Brentford on Wednesday.
Rashford was introduced for the young Swede shortly after the hour mark and he went close with a snapshot shortly after he had come on.
Bowen's dangerous, penetrating runs pushed United back and only a Fernandes sighter from distance, which comfortably cleared the bar, suggested the deadlock could be broken.
Rangnick upped the ante further as Cavani and Anthony Martial - greeted by a mixture of cheers and jeers - came on for Fred and Greenwood in search of the all important winner.
Thomas Soucek headed wide and De Gea was then finally tested with the Hammers first and only effort on target as a Declan Rice cross-shot struck Varane and needed the Spaniard's intervention to turn behind for a corner.
Martial fired wide on the turn before the dramatic denouement as Cavani held his run to stay onside and find Rashford to apply the coup de grace as Old Trafford erupted.
Overall team performance: 7/10
United Faithful Man of the Match: Marcus Rashford