Goals from Marouane Fellaini — his first in the league this season — and Jesse Lingard either side of half-time put United in the driving seat until substitute Rudy Gestede pulled one back for Boro to spark a late flurry.
However, Victor Valdes’ late slip handed Antonio Valencia the simplest of chances to make it 3-1 and ease Mourinho’s men into fifth place in the table.
The Portuguese said: “[It’s a] big win because it keeps us alive in the fourth position race. It was very important to keep us alive.
“Do I prefer [to] finish fourth or win the Europa League? I prefer to win the Europa League because the Europa League gives us the same, gives us Champions League football, but gives us a trophy, gives us prestige, gives us a European Super Cup.
“So I would prefer [that], but maybe we don’t win the Europa League, so we have to fight until we can to try to finish fourth and it’s what we did today without many players, but with a great answer in terms of attitude and desire from all the boys. It is a massive victory for us.”
Mourinho had earlier told BT Sport he was happy United had two ways of qualifying for next season’s Champions League.
“We don’t have plan B, C, D, E, F and G — but we have M, N, O, P and S,” he said. “It is fantastic because we manage, in the same week, to go to the quarterfinals of the Europa League which is an important target for us.
“At the same time, we got these three points that keep us in the race for the fourth position so we still have two doors for Champions League football next season.
“These guys gave everything. We started the game really well, Valdes made three fantastic saves before our first goal. We controlled everything until our second goal.”
With Zlatan Ibrahimovic suspended, Mourinho handed Marcus Rashford a start and was delighted with his contribution despite his failure to find the back of the net from a series of good opportunities.
He said: “Rashford is in trouble to score a goal. It’s really difficult to score a goal for him, but his movement is top class, his dynamic is second to none.
“[He’s] so intelligent, so sharp, the first touch to put the ball in the best position to attack the space, to attack the goal. For me, he played phenomenally. Goals will arrive, no problem at all.”
Mourinho said Lingard, who came off after taking a knock, had maybe hurt “something in his ankle, but nothing serious.”
Meanwhile, Lingard told BT Sport he had gone for goal because “I was looking for the pass, there weren’t any options and so I took it on myself.”
He added: “We had a lot of pace up front today and obviously we had the ball players in midfield to dictate the play. All round it was a good game for us.”
Fellow goal scorer Fellaini said: “It is always a pleasure to score. It was a great cross in.
“The game was tough. They pushed and played long balls and are physical. But we did it. We did well.”