It's a picture of David holding the head of Goliath. Basically the story goes Goliath is a giant who terrorizes villages, and one day the sheep herder David gets in a conflict with Goliath. So the next day the two do battle. Goliath approaches David, and David approaches Goliath. Goliath lumbers over David with an enormous shield and sword, while David has chosen a slingshot as his weapon. The giant Goliath is amused by his choice, but David ends up killing Goliath with one shot to the forehead from his slingshot. Goliath dies, David's village is saved, and David cuts off Goliath's head as a reward.
So I guess Dante's story resembles that of David's. He is an underdog overcoming enormous odds despite his enemy. This is probably why there are similarities between the two pictures.