The Red Devils had fallen to fifth place in the league after a winless run of three games and a string of cup commitments that had prevented them from registering a Premier League victory since mid-February.
Erik ten Hag's men were determined to settle a score with Brentford after a humiliating 4-0 defeat in their previous encounter in August.
The Dutch coach was critical of his team's attitude and desire in their loss to Newcastle on Sunday and demanded a response from his players.
United responded positively to their coach's call, starting brightly and creating several chances before Rashford's decisive goal.
Rashford, who started through the middle, was perfectly placed to side-foot home Marcel Sabitzer's knockdown for his 28th goal of the season.
Brentford, who had lost only one of their previous 16 Premier League games, offered very little attacking threat for the majority of the match.
They were nearly gifted an equalizer when Ivan Toney charged down David de Gea's clearance, but the ball flew inches wide of the post.
De Gea made an excellent save to deny Kevin Schade, who had Brentford's only other clear sight of goal.
With this crucial win, Manchester United has now climbed back into the top four of the league, while Brentford remains in ninth place with 42 points.