She admitted: "I mean it is a difficult road — especially being a young woman in the entertainment business, you're surrounded by attractive people," she said.
"I stop the temptation by killing the mood … It's like seeing a nice purse in the mall. You really want to buy it, but you have to save your money. So you walk around the mall thinking about the purse...
"There were times when I was like, 'Lord give me the strength to make it through this.' "
The 'Work From Home' singer recently insisted her vow of abstinence doesn't mean she can't still be "flirtatious and sexy".
She said: "I'm happy I can share it with my fans and be honest but it's also awesome because I can still be flirtatious and be sexy and fun in my music videos and in my songs.
"There's just a certain line that I'm comfortable with, you know, certain songs that I will sing, certain lyrics that I will change, but it's awesome just being empowered to be who I want to be."
And Ally has been inspired by other stars such as Jessica Simpson and Jordin Sparks, who also waited to lose their virginity.
She said: "That was awesome to know that, hey, I'm not alone in this choice and I'm being empowered by other women."