Messi surely was paid to go to Gabon. A "promise made years ago to visit Gabon" is a pretty weak explanation, and Messi has no actual ties to the country. And OF COURSE the Gabon government denied it; they'd obviously not want it to seem like they had to pay him to show up. But they surely did.
I'm not sure why it matters though. Why shouldn't he get paid to schlep to Gabon while on holiday to do something that raises the profile of Gabon? I don't see the problem. I wouldn't do that for free if I were him.
Paid or not, I think the bigger controversy is just that Gabon is not exactly the best regarding human rights, and Messi's visit could be seen as supporting their current regime. I think that criticism is a bit of a stretch, but perhaps Messi should think about the political implications of this stuff a little bit more.