Messi and his girlfriend Antonella Rocuzzo named the boy Thiago.
"Today I am the happiest man in the world, my son was born and thanks to God for this gift!" Messi wrote on Facebook. "Thanks to my family for the support! A hug to everyone."
Barcelona excused the 25-year-old Argentina forward from training Friday morning to attend his son's birth at a hospital in Barcelona.
The club announced the birth on its website after it was originally reported by Spanish and Argentina media outlets and confirmed by Messi.
Barcelona midfielder Andres Iniesta, who became the father of a baby girl last year, wrote on Twitter: "Much happiness to Leo and Antonella! Congratulations... I am very happy that everything went well!!"
In a recent interview with Spanish newspaper El Pais, Messi said he was looking forward to becoming a father.
"I'm prepared for Thiago's arrival, it is very exciting," said Messi. "It makes you think of things in a different way. You can no longer just think about yourself, you think about him, and how you hope he doesn't have any problems."
Earlier Friday, Barcelona coach Tito Vilanova said he still expected Messi to play in Saturday's Spanish league match against Celta Vigo at Camp Nou stadium.
"Leo didn't attend training, but tomorrow he will play in the match," said Vilanova. "If everything goes well, he will come to play. It doesn't change our plans at all that he didn't train today."
The birth of his child comes at the peak of Messi's prodigious career so far. After breaking a number of individual scoring records over the past season, Messi is two goals shy of matching Brazil great Pele's milestone of 75 goals for club and country in a calendar year, set in 1958. He is also a leading candidate to win what would be his fourth Ballon D'Or.