Canto XXXI of the Inferno describes a circle of giants ringing the edge of the Ninth Circle - figures from classical and biblical traditions who challenged divine authority, earning them punishment among prideful traitors. Their legs are sunk below the cliffs lining the central well, and their upper bodies, which Dante’s pilgrim first mistakes for towers, are chained to the earth. Six are named: Nimrod, who built the tower of Babel; Ephialtes, Briareus, Titos and Typhon, who assaulted various gods on Olympus; and Antaeus, who attempted to best Heracles.
Antaeus was the son of Gaia, spirit of the earth. He was known to challenge travelers to wrestling matches to the death, which he always won thanks to his incredible strength, which he retained so long as he remained connected to the earth. In his Eleventh Labour, Heracles discovers Antaeus’ weakness; Caesar Ab Avibus’ engraving after a design by Raphael shows Heracles lifting the giant off the ground in order to defeat him, crushing him to death.
Dante has Antaeus imprisoned by the icy cliff, but not chained like the other giants, as he did not take part in the war on the Olympian gods. Antaeus lifts Virgil and Dante and places them in the Circle below after the former flatters him.
Ephialtes, one of the twin giants known as the Aloadae, hatched a plot with his brother Otus to abduct Artemis and Hera from Olympus to become their wives. In one version of the myth, they were killed by Apollo for threatening the gods and storming heaven. In others they kill each other accidentally: while trying to capture Artemis she turns into a deer and leaps away between them, causing each of their arrows to hit the other.
Tales of the Aloadae offending the gods seem to have been common. Another story referred to in Homer's Illiad has them successfully capturing the god of war Ares in a jar; their stepmother Eriboea informed Hermes after a year, however, and Ares was freed.
Dante is astounded and frightened when Ephialtes rocks back and forth, causing an earthquake.
Stories of giants were a cultural commonplace in Europe long before, and after, Dante’s time. Along with Greek and Roman myths and references to giants in the Bible and its apocrypha, there were numerous folk traditions detailing encounters with monstrously enlarged figures. This was more than a literary trope though: noted historians like Herodotus and Plutarch discuss fanciful gigantic races and legendary heroes in scientific terms alongside factual evidence and historical figures. Even as late as the 17th century, the boundaries between reality and myth were unclear; take for example the scientific diagram of giants’ teeth, which is accompanied by a lengthy discussion, from Aldrovandi’s Monstrorum Historia.