When theAfter a creature dies, two things happen: State Based Actionsbut before triggered abilities are checked and Gift of Immortality's ability goesplaced on the stack. When state based actions are checked, State Based Actions are performed. The SBAs will cause both Rancor and Gift of Immortality both go to go the graveyard because they are not attached to anything (CR[CR 704.5n)5n]. This causes Rancor's ability to trigger
Then, so that goesit's time to place on the stack along withthe abilities that have triggered. Gift of Immortality's ability, and Rancor's ability are placed on the stack in whatever order you choose.
When Rancor's ability resolves, it returns to your hand. When Gift of Immortality's ability resolves, it returns the creature to the battlefield and creates a delayed triggered ability, which puts Gift of Immortality back on the battlefield, attached to the creature at the beginning of the next end step.
Angelic Destiny's ability works the same way Rancor's does, so it would also return to your hand.