Gilbert told her costars and the studio audience about her engagement that happened "about a week ago."
Perry – who is a singer, songwriter and producer – planned a musical picnic to pop the question, which Gilbert called "magical and amazing."
The pair, who announced they were in a relationship last fall, were eating in a park and enjoying listening to a musician playing nearby when the surprises started.
"I'm sitting there listening and I'm kind of daydreaming and I'm thinking like, 'If I ever proposed to her this would be an amazing way to do it,' " Gilbert said. "The people picnicking next to us pull out string instruments from under the blanket, walk over and they start playing 'Love Song.' "
The Cure tune is what Gilbert, 38, and Perry, 47, decided would be "their song" because another favorite, John Waite's "Missing You," was a breakup song, she said.
Then Perry popped the question in a unique way: "She goes to her backpack and she pulls out these T-shirts and the first T-Shirt says 'will' and then puts on another T-shirt and it says, 'you,' then 'marry,' 'me.' And the last one's a question mark," Gilbert said to the delight of the audience and her teary-eyed costars. "It's the most amazing proposal ever."
Before they left the park, Perry surprised her once more by introducing John Waite, who played "Missing You."
"We had our proposal with our breakup song," she said, "which is great."
Gilbert said she decided to share the news on The Talk because of the support she gets from the show's viewers and fans.
"I happened to be talking about gay marriage and I thank you all for your support on that issue. ... That was before I had any idea about any of this. I'm super shy and don't usually want to tell anything," she said. "But I wanted you guys to know because I feel like you're a part of our family here."