Olivier Giroud saved his and Arsenal’s blushes with a second-half goal to help defeat Sunderland 3-1 at the Emirates Stadium. The France striker had capped a dismal first-half showing for the hosts by turning a free-kick into his own net in injury time, cancelling out Joel Campbell’s opener. But Giroud found his scoring touch at the right end just past the hour mark to send Arsenal on their way to their first Premier League win since October and take them up to second place in the table. But only when Aaron Ramsey scored in injury time as Sunderland poured forward in search of an equalizer did Arsenal have any degree of comfort.

The result will come as a significant relief to Arsene Wenger. After three matches without a win that had seen Arsenal lose ground in a wide open title race, it was crucial that they began to take advantage of what is a huge opportunity to win a first title in 12 years.

Certainly they did it the hard way at a breezy Emirates on Saturday. Arsenal came into the match with talk around the club dominated by an all-too familiar injury crisis that has struck with increasing venom of late. And the absence of key players was only too evident in a performance that was far from being among Arsenal’s best.

Particularly conspicuous by their absence were the slick passing of Santi Cazorla in midfield and the intensity of Alexis Sanchez further forward. It meant that for much of the contest, Arsenal were insipid going forward, and, lacking the usual balance provided by Francis Coquelin and Cazorla, vulnerable at the back.

And there will doubtless be a large degree of frustration from Sunderland manager Sam Allardyce that his side failed to take greater advantage. Allardyce had led Sunderland to successive victories for the first time this season and an exit from the relegation zone ahead of their trip to north London. They arguably had the better of the chances on Saturday, too, particularly with ones that went begging at the beginning and end of the contest.

Within four minutes the visitors should have been in front. Arsenal were carved wide open on the break thanks to a simple through ball from Duncan Watmore, and Fabio Borini ought to have done a whole lot better than shoot tamely into the grateful arms of Petr Cech. There were further defensive lapses from Arsenal, too, including one from Nacho Monreal that meant Petr Cech had to be alert to keep out a deflected effort from Borini.

Sunderland, playing with three center-backs, had been impressively organized without the ball. But one lapse allowed the quality still available to Arsenal to give them the lead. Mesut Özil  was given too much space, and, with United States international DeAndre Yedlin ball-watching, picked a pass through to Campbell, who finished clinically.

Going into the interval behind would have been harsh on Sunderland, and they were given a gift to make sure that wasn’t the case. Right before halftime, Yann M’Vila put in a teasing, in-swinging free-kick and Giroud stuck out a leg to divert the ball into the top corner of his own net, past an unmoved Cech.

Ramsey had a fine chance to put Arsenal straight back in front before the halftime whistle, but shot wide of the near post. Still, it was a sign of what the Welshman was adding in a positive sense to the Arsenal team. While the passing acumen of Cazorla was missed, Ramsey’s deployment back in his favored central midfield position provided Arsenal with an extra threat breaking forward from deep. And that was to prove crucial in Arsenal going on to secure victory.

In the 63rd minute, Ramsey took Nacho Monreal’s layoff and put in a fine cross that Giroud this time turned into the right net with his head. The goal arrived during a spell that was by far Arsenal’s best of the match. But the pressure was short-lived, and Sunderland could easily have fought back to level for a second time in the match. The golden chance arrived in the 89th minute when Jack Rodwell played in full-back Patrick van Aanholt behind Monreal, but, to the despair of Allardyce on the sidelines, he shot over the bar on his weaker right foot.

It was to prove a costly miss. In the third minute of injury time, Ramsey bundled the ball home after a cross from the right to secure all three points. After a difficult week, a victory was arguably all that mattered, and it came with the bonus of seeing Theo Walcott make his return from injury off the bench. But a much improved performance will surely be required if Arsenal are to get the high-scoring victory they require at Olympiakos on Wednesday.