Please link cards
No. First of all, you are not casting a spell when Gift of Immortality returns to the battlefield, you are simply resolving the effects of a delayed trigger, so heroic will not trigger
Second, an aura spell only targets when it is cast. Returning attached would not target Agent of Fates, and so would not trigger heroic.