A gift that you give to someone that is actually more a gift to yourself?

If you're willing to settle for an adjective, I would call that a self-serving gift: a gift that is intended to serve your own interests above that of the actual receiver.

Per M-w.com, self-serving is:

serving one's own interests often in disregard of the truth or the interests of others


It's not a single word (I upvoted @Hellion's answer for that), but I use the phrase

he got me just what he always wanted

or

she got me just what she was hoping for

to describe this practice, altering pronouns as appropriate. Just be very cautious about substituting in the pronoun you!