It is loosely based on the story of Perseus. The story goes that Acrisius, king of Argos, asked the Oracle of Delphi how he could have a descendant for the throne. The Oracle told him that he would have a grandson and that he would die by his hand. When he learned that his daughter Danae was pregnant, rather than kill her, he put Danae and Perseus in a box (larnaca in Greek) and threw it to the sea.
Differences are the following: Danae was impregnated by Zeus; in the film it was Acrisius' wife. Perseus' lover was Andromeda, not Io. Both Danae and Perseus survived; in the film it was just Perseus who survived. Perseus' adoptive father was a fisherman named Dictys; in the film his name was Spyros. Dictys was the brother of the king Polydeykis of the island Serifos, where the box was found. Perseus' father was not killed by Hades; he was later made king by Perseus, in the place of Polydeykis, who tried to have Danae by force and he was shown the head of Medusa by Perseus. The myth says that this is the reason that Serifos is full of rocks that look like men (it is Polydeykis and his men). To kill Medusa, he was helped by Athena and Hermes, not directly by Zeus. Hermes gave him his sandals and Athena his sword and his shield. He also got the Helm of Darkness which belonged to Hades and renders anyone that wears it invisible, and a magic sack in order to carry the head of Medusa. Perseus had to get the head of Medusa because he promised it as a gift to Polydeykis for his marriage. He met Andromeda (bound to a pole) when he was returning home after getting the head.
Cassiopeia claimed Andromeda was more beautiful than the Nereids (daughters of Poseidon and lower goddesses of the sea), not Aphrodite. Hades did not kill Cassiopeia; she was punished by Poseidon by being placed in the heavens in a position that as she circles the celestial pole in her throne. She is upside down half the time. Perseus rescued Andromeda from a sea creature named Cetus, not the kraken. Cetus was sent by Poseidon, not Hades. This took place in Ethiopia and not in Serifos. Pegasus was a white winged horse; in the film he is black. Pegasus was born by the blood of Medusa that fell in the sea, when Perseus decapitated the head. Acrisius did not become Calibos and was not killed by Perseus; he was accidentally struck in the head with a discus thrown by Perseus (thus making true what the Oracle had predicted). Perseus, when he accidentally killed his grandfather Acrisius, became king of Argos. Because of his grandfather's death by his hand, however, he exchanged kingdoms with Megapenthis (his cousin) and so he became the king of Tiryns (Tirintha in Greek). Hercules is an ancestor of Perseus. At the end, in the movie, the head of Medusa seems to be dropped into the sea; in Greek mythology, Perseus gives the head to Athena and she nails it in her shield.
Finally, Calibos, Djinn, and the kraken do not exist in Greek mythology.