The Zen Whoberi was a population who were wiped out by Badoon. (However in the original storyline they were killed by the Universal Church of Truth.) Gamora was the only one of the Zen Whoberi that survived. Thanos discovered Gamora alive and decided to save and train her as a weapon to use against and kill the Magus. Thanos made sure Gamora was raised with discipline, though he did on occasion show her affection as a father would show his child: such as celebrating the pagan Yule with elements of Christmas. Through rigorous training she would become a highly skilled master of various martial arts from throughout the universe.
Even though Gamora was learning and becoming a master martial artist, she still had more to learn. While still a young girl, she went on a trip with Thanos. Though explicitly against Thanos’ orders and warning, out of curiosity she decided to venture planet-side, where she fell into an ambush set up by a group of thugs. The attackers used their numerical advantage and were able to defeat her in spite of her great skill. She was severely injured in the fight and gang raped.
Near death, her proverbial knight in shining armor arrived in the form of Thanos, who quickly dispatching the assailants. Thanos recovered the apologetic and near death Gamora. After returning to Sanctuary Thanos restored and augmented Gamora. This was achieved via bionic implants and replacement parts of Thanos’ own design. These physical and power upgrades made her an equal to Adams Warlock’ own physical abilities. She also received specialized training and abilities including resistance to reality distortion as well as an accelerated healing factor, that rivals even Wolverine’s. Her purpose was to kill Magus, Adam’s evil godlike counterpart.
Got this from comic vine