"I was totally shocked because it's such a small space. Everyone went crazy!" said Kyle Luker, who shot video of the Grammy-winning singer playing "Shake It Off."
He'd been at the club for about 90 minutes when Swift came on stage.
Actor Jesse Tyler Ferguson emceed the event and joined Swift on stage to dance and sing along.
The "Modern Family" star thanked Swift on Twitter.
"I'm so happy I don't have to keep this secret any longer. Look who came to celebrate the 50th anniversary of Stonewall at the Stonewall Inn. @taylorswift13, you are a gem. Thank you for everything you do for the LGBTQ community. We (heart emoji) you!" he wrote, ending the tweet with a rainbow emoji
Friday was a busy day for Swift.
She also released a new single from her upcoming album, "Lover," which is scheduled to come out August 23.
A video for the song "You Need to Calm Down" drops Monday.
The song's lyrics challenge internet bullies and express support for the LGBTQ community.
In April, Swift donated $113,000 to the Tennessee Equality Project, a pro-LGBTQ advocacy group.
The-CNN-Wire™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.