Personally I think it is the former, because 彼女が好きな田中 means "Tanaka, who likes her". Doesn't that make sense? However, Google Translate translated it to "Tanaka is her favorite". Is the translator wrong, or am I?

Personally I think it is the former, because 彼女が好きな田中 means "Tanaka, who likes her". Doesn't that make sense? However, Google Translate translated it to "Tanaka is her favorite". Is the translator wrong, or am I?

It's ungrammatical in the first place.

田中は彼女が好きです。-> "Tanaka likes her," "Oh, Tanaka? She like him," etc.

田中は彼女が好きなのです。-> "Tanaka likes her, you know what I mean?" or the like.

田中は彼女が好きな人です。 -> "Tanaka is the one she likes," "Tanaka is the kind of person who likes her," "Tanaka is the person who likes her," etc.

A: 佐藤はもてるよな。山田はそこまでじゃないけど一部の女にすげー人気あるよな。でも田中はやばくね？あれを好きになる女はいねーだろ。
Satoh is popular among girls. Yamada isn't as popular, but some girls really love him. But I don't know if any girl would ever find Tanaka cute.

A: は？誰だよそれ。つかお前「田中なら」って言えよ。わかりにくいんだよ。
Huh? I don't know who you're talking about. (The remaining part defies translation. It's basically saying that the wording 田中は彼女が好き is confusing because while it can mean "She likes him," it usually means "Tanaka likes her.")

By the same token, 彼女が好きな田中 can be "Tanaka, who likes her," "The Tanaka whom she likes," "The personality Tanaka has that she likes," etc.

Before you criticize someone, walk a mile in their shoes. That way when you criticize them, you are a mile away and you have their shoes.

Personally I think it is the former, because 彼女が好きな田中 means "Tanaka, who likes her". Doesn't that make sense? However, Google Translate translated it to "Tanaka is her favorite". Is the translator wrong, or am I?

I think that you shouldn't be using google as a translater. It can sometimes be very wrong. (chigaimasu darou)