The win means United move to fifth place in the league and only three points behind fourth-placed Liverpool, who they have played a game fewer than.
When asked whether the victory was "justice for Karanka" following the game, Mourinho said: "Justice for Karanka is the work he did here".
And they are now 18 matches unbeaten in the league, having already won the EFL Cup and reached the quarter-final of the Europa League.
Even defeating a team who are second-bottom of the table and have just parted from their manager, Mourinho did his best to portray the win as a Sisyphean task completed, a victory against significant odds.
Manchester United's Belgian midfielder Marouane Fellaini (2L) celebrates with teammates after scoring his team's first goal during the English FA Cup fourth round football match between Manchester United and Wigan Athletic at Old Trafford in Manchester, north west England, on January 29, 2017.
Agnew was encouraged by a performance during which Boro briefly threatened to force a draw.
"(A minimum of) Three years, I think I will be here, I think the club understood the necessity to give stability to all levels", Mourinho said. He felt sufficiently confident to be convinced his charges were not to blame for the tunnel fracas.
"I don't really look into social media too much and what people write", he said. "I think I was just not good enough for him but it's ok, I'll show my quality here now and I will get back to my top level and we will see how things turn out". It signs auger well for the Reds, but Mourinho's side must not only face down tired limbs on Teesside, but will have to do it without a clutch of injured and suspended players. United manager Jose Mourinho was without suspended Zlatan Ibrahimovic and Ander Herrera, while Paul Pogba was injured and Henrikh Mkhitaryan was only on the substitutes' bench. The first clear cut chance of the game came in the 7th minute, when youngster Marcus Rashford showed his speed to breeze past Bernardo Ezpinoza, only to be stopped by ex red Victor Valdes. He's so intelligent, so sharp.
"I think the squad that he has picked this time is a very young squad, a lot of players from the under-21s".
But the game was not over as Alvaro Negredo, a handful all afternoon, directed two headers off-target as Boro pushed for a goal that arrived in the 77th minute.