In the end, the little patients gave Pope Francis a basket filled with little notes containing descriptions of their prayers and their dreams.
"Thank you," the pope told the children. "We will present them together to Jesus. He knows them better than anyone; he knows what is in the depths of your hearts.
"Especially with you children, Jesus has a special bond," the pope said. "He is very close to you."
More than 3,000 parents, children and staff gathered outside the main entrance, keeping Pope Francis busy for a long time listening to prayer requests, giving blessings and exchanging tight hugs.
Mostly without cameras following him, the pope also visited the 12 babies in the neonatal intensive care unit, the eight children in intensive care and the 18 youngsters in the hospital's nephrology department.
He also wandered throughout the hospital, visiting dozens of rooms, kissing the tops of heads, accepting drawings and even blessing a stuffed animal.
In the hospital chapel, he met 30 children suffering from cancer; they were the ones who gave him the basket of prayers and dreams.
Just outside the chapel, he blessed and held hands tightly with members of the "Children in Heaven" parents' support group.