Weah got his goal in the 36th minute of Monday's game to become the first player to score against Wales in a World Cup since Pele, who was 17 years old when he did it in 1958. That was the last time Wales played at the World Cup before this year in Qatar.
Weah posted a photo of him celebrating the goal on Instagram and Pele congratulated him in the comments section.
"Congratulations. It was a beautiful goal. Keep dreaming, dreams come true," Pele wrote.
Weah responded to "Papa Pele" by thanking him for the "inspiring message."
"It is such a blessing and an honor to receive such an inspiring message from The King himself," Weah wrote. "Thank you for everything you’ve done for the world and us young black men. Grandes Abracos."
The 22-year-old Weah is the son of George Weah, the current president of Liberia and the 1995 world player of the year. Weah has scored four goals in 26 appearances for the United States.