Swift high-fived the royal after their performance in front of 600 guests at Kensington Palace Tuesday night.
Swift, Benedict Cumberbatch, Colin Firth and Michelle Dockery were among the stars who attended the Winter Whites Gala to raise money and awareness for Prince William's youth homelessness charity, Centrepoint, People.com said.
"I am so excited," Swift told reporters before the event. "I don't think I have ever played in a palace before. So it will be really wonderful. This evening is so special ... it is for a charity that as well as being very important to Prince William is also very important to me."
People.com quoted the singer as saying Prince William "was really funny. So cool."
2014: The Year in Fashion [PHOTOS]
Jason Aldean to extend Burn It Down Tour