The pair then continued to make their way to their car as some fans attempted to apologise for the incident.
Reps for the couple have not commented on the incident.
The couple - who have sons Chet, 32, and Truman, 27, together - married in 1998 after 12 years of dating but Tom previously admitted he had had a crush on Wilson since she appeared on TV as Pat Conway in The Brady Bunch.
Hanks - who also has Colin, 44, and Elizabeth, 40, from his marriage to Samantha Lewes - said: "Oh, every now and again I just pull it up in YouTube. All of the stuff that she was in," he told The Knot in 2016. "I was actually at a friend of mine's house when that aired and remember thinking, 'That girl is cute'."
Meanwhile, Wilson insisted she and Hanks have stayed married for so long because they work hard on their relationship.
She said: "It's like anything. We got married, we committed to each other, we love each other and we work hard at our relationship … Not only do we love each other, we really like each other, and we like being together, and we support each other and we keep the communication channels open. That's always important."