The 35-year-old actress shared the moment on Tuesday's episode of The Ellen DeGeneres Show, saying she was having a girls' night out with friends when she realized the 21-year-old singer was at the same restaurant.
"Someone gets on the piano and starts playing a song and we're like, 'Wow, this is really good,'" Dewan recalled. "Then we're like, 'It sounds like Justin Bieber, so weird.' Then people start saying it's Justin Bieber ... and it all dawned on on us at once."
"We all completely fangirled out," the star admitted. "We're all married with like 1.5 kids, [but] we immediately turned 16. We sent him a drink to say thank you for serenading us and he comes over to our table."
Dewan and Bieber discussed Lip Sync Battle before the singer requested a selfie to send to Channing Tatum -- Dewan's husband and Bieber's "man crush." The actress and Tatum married in 2009 and share 2-year-old daughter Everly.
"I had a great Valentine's. Channing came back early from a press tour and surprised me, which was so sweet," the star told DeGeneres. "I come home and I walk in ... and then I was like, 'Wait, there's roses.' He put roses all the way up to the room."
Dewan plays Lucy Lane on the CBS series Supergirl, which airs Mondays at 8 p.m. ET. Tatum last starred in Hail, Caesar! with Josh Brolin, and is slated for Gambit with Lea Seydoux and 23 Jump Street with Jonah Hill.