Back to the original question: Is gifting a planet to a doomed ally a gamey move?
I am with Geo on this. A lot depends on what the motivations and reasons for this are. If it is psychological in nature (for example if the game involves a group of friends playing who will have "bragging rights" and will relentlessly rib anyone who is eliminated then perhaps a subset of this group will act to avoid letting their ally be eliminated because they don't want to see their friend insulted outside of the game). In these sorts of cases I don't see anything wrong with the gifting of a planet.
Gifting the trade income back to the player who gifted you the planets is extremely gamey and exploiting an "unrealistic" bug and is not something that I would condone.
The whole problem here is not actually the gifting of planets, but is the way trade income works. The way it should work is the income derived should be the percentage of the smaller empires income, not each member of a trade alliance taking a percentage of their partners income. If it wasn't for the screwy way trade is implemented in SEIV then this whole thing wouldn't even be an issue. Also it is theoretically possible that someone had a wide ranging intercolonization agreement with their ally and because of this you are able to virtually wipe out an empire except for one or two planets which were deep in their allies space. Practically speaking, this is the same situation, but it is 100% not gamey.
Lastly to anyone who is listening...

A game is certainly Last man standing unless explicitly discribed otherwise. However, I do wish that there was a way to end a game with a mutually agreed upon single winner say when one empire takes over 3/4 of the known galaxy and it is only a matter of time before the others fall.