This piano ballad makes it clear that Perry struggled with the breakdown of her marriage to Russell Brand. She admitted to Billboard magazine that the start of the song where she is lying on the floor of a bathroom, fighting suicidal thoughts actually happened. "That song is evident of how tough it really was at a certain point. I asked myself, 'Do I want to endure? Should I continue living?'" said the Californian singer. "All the songs are real-life moments. I can only write autobiographically. I put all the evidence in the music. I tell my fans if they want to know the real truth about stuff, just listen to the songs."
Perry croons in the chorus how God gave her the strength to carry on after the failure of her marriage:
By the grace of God
I picked myself back up
I put one foot in the front the other
Katy was brought up in a Christian household and both her parents are pastors. She sung in church up to the age of 17 and her first release was a Christian music album released by a Christian record label.
Perry debuted this ballad during her headline set at the iTunes Festival in London on September 30, 2013. She explained that it was the first song she wrote with her frequent collaborator, Canadian songwriter/producer Greg Wells back in November 2012, when starting work on Prism.
Other collaborations between Perry and Wells include "Ur So Gay
," "Waking Up In Vegas
" and "Not Like the Movies
" as well as the Kelly Clarkson song "I Do Not Hook Up
." Speaking during a discussion at the 2013 ASCAP "I Create Music" Expo in Los Angeles in April 2013, Perry gave insight to her "word vomit" writing process with the Canadian songsmith. "[Greg Wells] allows me to vomit words," she explained. "Not that I can't find that with others, but he just lets me [makes retching sound].
Perry told Extra host Mario Lopez how the depression she suffered after her marriage to Russell Brand ended up inspiring this song. "When I started the record in November 2012, I was kind of in a darker place and had a little bit of my self-confidence shattered, so I was trying to build it back up," she said. "I wrote this song, 'By the Grace of God,' which was about me having a lot of negative thoughts in my mind, then you hear me find my strength throughout the message of that song and I come out in the end all right."
Perry tweeted that this was her most personal song from the Prism album before performing it at the Grammy Awards in 2015. Before her performance, President Barack Obama appeared in a recorded message asking viewers and artist to join the "It's On Us" campaign to help end domestic violence. This was followed by an appearance by Brooke Axtell, a domestic violence survivor who told her story of abuse before Perry performed the song.
Axtell, an Austin-based activist, was contacted by the show's executive producer Ken Ehrlich, and wrote her "written word" piece specifically for the show.
So was Perry a victim of domestic violence? According to Axtell, Perry never said so when they talked about the performance, but it was clear that Katy had been through a devastating relationship.