The Forrest Gump star was mid-jog when he came across Elisabeth and Ryan, who were having their wedding photos taken in Manhattan's Central Park.
Meg Miller, who posted photos of the encounter on Instagram, said Hanks' arrival was "the icing on the cake" to an "amazing celebration".
Yesterday's wedding was so beautiful! Elisabeth and Ryan you planned one amazing celebration. The icing on the cake was @tomhanks stopping in Central Park to wish them congratulations. #megmillerphotography #newyork #nyc #nyminute #celebrity #brideandgroom #tomhanks #weddingdress #wedding #weddingday #blacktie #centralpark #blackandwhite #huffpostido #stylemepretty #weddinginspiration #selfie #celebritysighting
"We were photographing the bride and groom in Central Park and a guy on a jog started to slow down near the couple," she told the BBC.
"He leaned in close as he took off his hat and sunglasses and said, 'Hi, I am Tom Hanks' while reaching out to shake the groom's hand.
"He asked their names and wished them congratulations, and before he left he asked to take a selfie with them. He posted it within minutes to his Instagram, Twitter and Facebook."
Hanks' Instagram post of the trio's selfie received more than 74,000 likes.