If it was a creature: It returns face-up. Gift will return attached to it on your end step.
- If it was an aura: It returns face-up attached to something it could legally enchant if possible. This may mean enchanting an opponent’s creature for their benefit, since you can’t just choose not to return it! If there’s nothing it could legally enchant, it just stays in the graveyard, and so does Gift.
- If it was an artifact, enchantment, land, or planeswalker: It returns face-up. When Gift triggers on your end step, it won’t be able to enter attached to a non-creature, so it just stays in the graveyard (unless you managed to turn that object into a creature somehow before the trigger resolves!).
- If it was an instant or sorcery: It want to return to the battlefield face-up, but that’s simply unacceptable to the game rules for an instant or sorcery to be on the battlefield, so it stays in the graveyard, and so does Gift.
Hope this helps clear up the possibilities!
Today’s Rules Tip written by Josh Stansfield