"I had this little chorus for years and it was, 'You love who you love,' and I thought that was always going to be a great thing someday," Mayer, 36, said today on " Good Morning America." "A song that people could hear and feel that sort of permission."
It wasn't until Mayer played the song more recently for his record producer that Perry, 29, became a part of the picture.
"The very first thought was you can't do that and then the more I thought about just the music part of it, it made perfect sense, even if I didn't know Katy, it would have made perfect sense," Mayer said. "I went in the other room [and] called her phone."
Mayer and Perry, who first made headlines as a couple last summer, debuted the song's music video today on "GMA." They star in the video alongside real-life couples who answered a casting call, as well as a mechanical bull.
"It's just so authentic," Mayer said. "There's nothing scripted in that video except putting a bull in the middle of the desert."
Perry, who has endured a high-profile divorce from comedian Russell Brand and a brief split from Mayer himself, said the bull was there for a reason.
"Relationships are kind of like riding a bull," she said. "You hang on for dear life and sometimes you get a little buck here and there and sometimes you get things thrown at you but you get back on."
The two music superstars said they learned a lot about each other while recording the song and filming the music video. For Mayer, it was that his girlfriend is a hard-working, busy woman.
"Katy is a superstar for a reason," Mayer said. "That's the thing about working with somebody you love. You get to see them. I had to [make] a video in order to get to see my girlfriend."
For Perry, collaborating with Mayer allowed her to see another side of her boyfriend.
"John has a very gentle, authentic tough to everything he does," she said.
Mayer even gave a glimpse into how the duo collaborated while they were both in the studio at the same time making their respective records.
"I come in the studio and she plays stuff and I go [mumbled noises] and then I'll hear a melody, because she'll be writing something, and I'll be like, 'Don't, don't, don't,'" Mayer said. "And I'll go, 'Come here, come here, come here,' I sang this into my iPhone while you were in here. Just check it out."
"Or he'll just pick up a guitar and play something," Perry said.
Click HERE to watch the couple premiere their "Who You Love" music video live on "GMA."