Atlas, god of endurance and astronomy
Atlas (the heaven-bearer) was a Titan god of endurance. He was also identified as a god of astronomy because he was the first who instructed mankind in astronomical science which was basically used for navigation and measuring the seasons. It is said, in Library of History by Diodorus Siculus, that he surpassed all others by mastering astrology and was the first to discover spherical nature and therefore being touted as the heaven-bearer. According to Hesiod and Hyginus, Atlas was one of the four sons of Iapetus and oceanid called Clymene but in another source, according to Apollodorus, Iapetus and Asia were his parents. During the war of the gods, unlike his brothers Prometheus and Epimetheus, Atlas sided with the titans along with his other brother Menoetius. After the war he was punished by Zeus who decided not to send him to Tartarus together with his relatives but instead he was sent him to the western edge of the known world, to hold axis between heavens and earth apart and therefore prevent the recurrence of primeval union of Gaea and Uranus and probably a birth of new powerful descendants.
Condemned to a special punishment
During the war against Olympians, Cronus made Atlas their leader, mostly because of his war skills, extreme orientation and durability. As it turned out, he was quite a leader and it looked like for a long time that they were going to win the war. However, they were outnumbered in the end because Cronus made too many enemies during his ruleage. Atlas was, unlike his relatives, condemned to a special punishment by Zeus himself. He made him as an eternal caretaker of the axis between heavens and earth which were controlled by his predecessors in the past. Because of his endurance, Zeus believed that he was just going to be able to hold them and do nothing else in the meantime. He was right, Atlas was, according to Aeschylus and Ovid, barely supporting the enormous weight of heavens on his shoulders. However, there is an alternative description of the titan by Valerius Flaccus and Virgil who are describing him as an enormous giant standing in the ocean with his feet and his head reaching above the clouds while with ease holding heavens apart from earth.
Descendants of Atlas
But before the punishment, Atlas was in love with Pleione, one of the oceanids, the daughters of Oceanus and Tethys, who gave birth to Pleiades, seven in numbers, that were mentioned by most authors. Their names were Alcyone, Asterope, Celaeno, Electra, Maia, Merope and Teygate. There is a further explanation presented by Hyginus who mentiones in his Fabulae that Atlas and Pleione actually had twelve daughters and a son Hyas. Five of them were Hyades and were named after their brother who was killed by a lion and they had grieved for him so much that they died because of it and were placed among stars. Their names were Ambrosia, Coronis, Eudora, Phaesyla and Polyxo. And when Hyades died, the rest of the sisters also brought death upon themselves by further grief and were placed among stars known as Pleiades. According to Diodorus Siculus, Atlas also had a brother Hesperus and eventually married one of his daughters by the name of Hesperis. She bore him seven daughters that were named Atlantides, after their father, and Hesperides, after their mother. They were very beautiful and pure and therefore they caught the eye of Egyptian king who dispatched pirates to kidnap them. They were later saved by Heracles.
The account with Heracles
As mentioned above, the daughters of Atlas were kidnapped by pirates while they were playing in their garden and when the pirates stopped to have a meal on their route back to Egypt, Heracles, in one of his last labours, came along. When he found out by the maidens what had happened, he slew the pirates on site and brought ladies back to Atlas. In his gratitude, Atlas helped Heracles in his labour, presumably giving him the apples from his daughter's garden, and also gave him lessons in astrology.
However, the mainstream belief is that Atlas was encountered by Heracles who came to the titan on the advice of Prometheus in his eleventh labour, when he had to retrieve apples of Hesperides. In need of his services, Heracles offered himself as temporary caretaker. In return he asked the titan to help him with the Golden Apples quest. The garden, controlled by Hera, was tended by Hesperides, the titan's daughters. Upon return, Atlas tried to convince Heracles to hold the heavens for a bit longer while he was going to deliver the Apples himself which was definitely not the case. Heracles thought of this trickery and asked him to hold the heavens for just a few moments so he could reposition his cloak to serve him as support. The titan fell for the trick and when he reclaimed his position, Heracles took the apples and ran away, and opportunity to escape was gone.
"Released" from his burden
According to Fulgentis' Mythologies and Ovid's Metamorphoses, Atlas, with the heavens on his back, was at some point encountered by Perseus who was on his way back to Seriphos Island. Perseus kindly asked the titan for a shelter over night, telling him that he was a son of Zeus. The titan replied by stating that he was a liar which angered the hero and Perseus then in revenge turned Atlas into stone by showing him the head of Medusa and released him from his burden. From that point on he was known as Mount Atlas. Now, this contradicts the story of Atlas meeting Heracles becuase Perseus lived in the times before Heracles and therefore Heracles could not meet Atlas and ask him for help, if he was already turned into a mountain.