Argentina were looking to make it back-to-back tournament victories but were beaten by Ferran Torres' strike in extra time, earning Spain their second World Cup title.
Argentina experienced similar heartbreak after they were beaten by Germany in the 2014 final, meaning Messi has now lost twice in the defining game of the competition.
At 39, it could turn out to be his final World Cup, but Messi showed no signs of slowing down as he contributed eight goals and four assists.
Messi, expressing his feelings publicly for the first time since Sunday's loss in New York, posted on Instagram: "The pain is immense, and this wound will take time to heal. But I also hold onto all the good things.
"The matches we turned around by giving it our all — moments that will remain in our memories forever – and the support of an entire country which, combined with this group's hard work and effort, brought us back among the world's elite once again.
"It is hard to fully appreciate our achievement right now, but this group reached two consecutive World Cup finals.
"Thank you from the bottom of my heart for every greeting and message. Once again, we managed to unite as a country and stand together, sharing the immense pride of being Argentine.
"I also want to congratulate Spain on winning the championship."
Meanwhile, FIFA are set to open an investigation into the confrontational behaviour displayed by a handful of Argentina players and at least one coach after the team's defeat to Spain.
After Spain won their second ever World Cup title, Argentina midfielder Leandro Paredes was handed a red card for confronting multiple Spain players on the field. Defender Nahuel Molina had his own confrontation with Spain captain Rodri.
The behaviour of assistant coach Roberto Ayala also will be reviewed.
The probe also will include a review of the Argentina team's behaviour during the post-match festivities when players reportedly turned their backs on the trophy presentation.