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 Middlesbrough 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."