In the league's first Friday night start, Arsene Wenger's side was trailing 3-2 with seven minutes remaining but Ramsey grabbed the equaliser and Giroud headed in an 85th-minute victor.
After that, though, Leicester City had the Gunners on the ropes for most of the game, taking a 3-2 lead in the second half off of Jamie Vardy's second goal of the match. After Aaron Ramsey leveled in the 83rd minute, Giroud sealed the three points within two minutes on an evening of thrilling attacks gifted by fragile defending.
Many observers may have thought Giroud's days at Arsenal were numbered following the arrival of fellow France striker Lacazette from Lyon for a club-record £46.5m fee.
Arsene Wenger is relieved Olivier Giroud didn't take him up on the offer to leave Arsenal.
"You know, I must say I opened the door for him at some stage because I know that it's important for him to play".
"It is fantastic", Wenger replied when asked about Giroud's willingness to fight for his place.
"He is really loved here, we love him and, in the end, he made a decision to stay".
Arsenal would hold on to secure an incredible victory in a magnificently entertaining season opener. "We were quite good previous year on corners and overall I believe that with a bit of work we can get that out of the system", the French coach added.