Messi, who scored Barcelona's second goal in the club's 2-0 win over Villarreal on Sunday, had his record of five Ballon d'Or wins matched earlier this month as Ronaldo took the latest crown.
"I have a lot of respect for Cristiano Ronaldo," the Croatian international told Mundo Deportivo. "But he has played with the best player in history, which is Lionel Messi.
"Those who come behind are unlucky enough to have coincided with him."
The 2017 Ballon d'Or result means that Ronaldo and Messi have shared the last 10 awards between them, dating back to the former's first win in 2008.