Goals from Alexis Sanchez and Mesut Ozil were enough to give the Gunners all three points at the Riverside Stadium, despite Alvaro Negredo having levelled the scores shortly after half-time.
The victory ended a run of four consecutive away losses in the Premier League for the Gunners and took them back to within seven points of the top four, having played a game fewer than fourth-placed Manchester City.
Although the Frenchman accepted that the display was far from perfect, Wenger was thrilled with the level of commitment from his players, having seen them crumble in a 3-0 loss at Crystal Palace last time out.
"I felt we were focused and committed. You could see we did not play with full confidence, but overall we really wanted to win," the Arsenal manager told Sky Sports.
"Second half, we missed the final ball when we could maybe have added one or two more and they created chances with crosses and set-pieces.
3 - Three of Arsenal's last four away league wins have been against the sides currently in the relegation zone. Expectations.— OptaJoe (@OptaJoe) April 17, 2017
"Middlesbrough gave everything. It's one of their last chances to stay in the league.
"There are still some chances where maybe we could have played better with some long balls, but the focus and commitment was there.
"It was a testing point for us, mentally [at 1-1] it was a moment when I felt that 'now we'll see where we go'. You could see the players have a good mentality, they wanted to win the game and they responded."
Wenger experimented with a back three of Gabriel, Laurent Koscielny and Rob Holding, and the 67-year-old explained that he had grown concerned about the Gunners' susceptibility to conceding from direct approach play.
"I felt it added a bit more stability on the long balls, we've recently been punished with that," he said. "We let them have the ball a bit more than we're used to. Against Palace and West Brom, we had 70 per cent of the possession and we lost.
"We want to have the ball, but sometimes, when a team lacks confidence, a change in system can help them believe in something different."
Boro boss Steve Agnew was hugely frustrated to take nothing from the match, but insisted that his players showed they have a chance of surviving, despite the six-point gap between them and safety.
"We are bitterly disappointed with the result, but the players gave everything they had. We couldn't ask more of them," he told Sky Sports.
"I felt we might get the second goal after Negredo scored. The ball just wouldn't drop in the box for us. We put them under tremendous pressure.
"We just have to keep the season alive. We need a win and I'm confident we'll get it.
"This group don't know how to give in. They will never, ever stop."