The Gunners took the lead with their first attack through summer signing Alexandre Lacazette as the Premier League season began with a bang.
The French striker, who joined from Lyon, headed the hosts ahead after just 94 seconds from a Mohamed Elneny delivery but their lead did not last long.
Shinji Okazaki nodded home an equaliser just two minutes later before Jamie Vardy opened his account for the campaign as he poked home Marc Albrighton's cross, albeit against the run of play.
Arsenal were level at the break however, as Danny Welbeck restored parity with the final kick of the first half.
Vardy headed home Riyad Mahrez's corner 10 minutes into the second half but a double substitution from Arsenal boss Arsene Wener proved to be an inspired move as he introduced Ramsey and Giroud on 67 minutes.
Ramsey grabbed the equaliser with seven minutes to play and moments later Giroud headed home Granit Xhaka's corner to secure all three points for Arsenal.