Accepting an award for LGBT advocacy at the Human Rights Campaign Gala on Saturday, the daughter of two pastors said she spent much of her youth attending religious schools and camps.
In her acceptance speech, the singer said when she was growing up, "homosexuality was synonymous with the word 'abomination'."
She added that she "prayed the gay away at Jesus camps."
She also told the crowd that she had since come to terms with her own sexuality.
Perry, 32, said that there was a lot of truth in her hit song I Kissed a Girl.
"Truth be told, I did more than that. But how was I going to reconcile that with the gospel-singing girl raised in youth groups that were pro-conversion camps?" she told the audience.
"What I did know was that I was curious and even then I knew sexuality wasn't as black and white as this dress.
"Honestly, I haven't always gotten it right, but in 2008 when that song came out, I knew that I started a conversation that a lot of the world seemed curious enough to sing along to."
Before finding success under the stage name Katy Perry, the superstar released an album of Christian gospel songs as Katy Hudson in 2001.