A fan-led minute's applause was held during Tuesday's Premier League game between Liverpool and Manchester United, which Ronaldo missed following his son's death.
"Me and my family will never forget this moment of respect and compassion."
Ronaldo wrote on Instagram: "One world… One sport… One global family… Thanks, Anfield."
Ronaldo added three hands-praying emojis alongside a video of the Anfield crowd applauding in the seventh minute – the Portuguese star's number.
The 37-year-old, who has four older children, announced last October that he and his partner Georgina Rodriguez were expecting twins. Their baby girl survived.
A statement from Ronaldo and Rodriguez on Monday said the death of their baby boy was "the greatest pain that any parents can feel".
"Only the birth of our baby girl gives us the strength to live this moment with some hope and happiness," the statement added.