Against a plucky Leicester side at a packed and tense Emirates Stadium, Arsene Wenger's men scored twice in the last 10 minutes - first through substitute Aaron Ramsey before the much-maligned Giroud headed in the victor off Granit Xhaka's corner.
Over 80 minutes down and Leicester leading by a goal, it looked as if Arsenal was facing a crushing defeat, but Aaron Ramsey's 84th minute goal spun the mood of the stadium on its head.
The French striker came off the bench to hand the Gunners all three points in a thrilling 4-3 win over Leicester on Friday night. "I didn't want him to go", Wenger told Sky Sports.
"At one stage I opened the door for him as I knew I had many strikers, and in the end he chose to stay".
"The second goal was scored after a poor pass, which can happen, but we conceded the other two after corners".
"It was good. Obviously I'm still getting used to the English game, the positives and negatives, shall we say, but I'm learning".
The Gunners won the FA Cup last season and lifted the Community Shield last weekend after beating Chelsea at Wembley.
Wenger said he gave Giroud the option to leave for another club this summer in search of more regular playing time but was thrilled when the striker made a decision to stay.
"It is a relief and I believe as well a reminder to the players that they have hurdles on the way and that we can get round it, like tonight so that is quite positive".
Arsenal's quickfire lead lasted barely three minutes before Marc Albrighton's cross from the left was headed back into the middle by Leicester's new signing Harry Maguire and Okazaki nodded the ball past flailing Arsenal keeper Petr Cech.
The 67-year-old manager praised his side's spirit after their comeback win and admits that there is work to be done in defence after letting Leicester score from two set-pieces. We have many games and hopefully I can give games to all the strikers.
The Serie A side have now said they will not increase their offer and Shakespeare is happy to have Mahrez in the team. It's no doubt going to spoil all of us because the rest of the games are going to suck by comparison.
"After that, we get the efficiency".