Investigators are trying to determine the cause of the smash in the south of the country between the towns of Andria and Corato.
Dozens of other people were injured when the two passenger trains collided mid-Tuesday morning.
Recovery operations using a giant crane and rescue dogs continued throughout the night and into Wednesday to remove the mangled debris.
In a telegram to the Archbishop of Bari, Monsignor Fracesco Cacucci, the Pope spoke of his shock.
Francis said he shared in the pain of the many families. He said he was mourning those who died and praying for the injured to recover quickly.
After visiting the crash site, Prime Minister Matteo Renzi declared it an "absurd" tragedy and vowed to investigate fully.
Union leaders and railway police blamed human error, noting that particular stretch of track did not have an automatic alert system that would engage if two trains were near eachother on the same track.
Passengers described being thrown violently forward at the moment of impact, and then trying to free themselves from the tangle of metal, body parts and debris in the scorching midday sun.
"I don't know what happened, it all happened so quickly, I don't know," one woman, who is eight months pregnant, told the Associated Press. "I saw my mother on the ground, my father and my sister bleeding, I don't know, I don't know, even I don't know."