What does 頑張って Ganbatte mean?

Ganbatte (頑張って) means do your best, or keep at it. Subtitles can render it "good luck", which swaps a word about effort for a word about luck.

Written
頑張って (ganbatte)
Literally
Persist. The te-form of 頑張る (ganbaru), spelled with 頑 (stubborn) and 張る (to stretch), characters chosen as ateji.
As slang
Completely ordinary and said constantly, to colleagues, students, athletes and strangers. Neutral in register and not remotely poetic.
In anime
Subtitles can render it as "good luck", which quietly changes the subject from effort to fortune.

Ganbatte tells someone to apply themselves and keep going. It is an instruction about effort. English subtitles can render it as good luck, which is a reasonable thing to say at the same moment and a different thing to mean.

The characters

頑 (gan) means stubborn or obstinate. 張る (haru) means to stretch, to spread, to hold something taut. Those characters are ateji, chosen for the spelling: Digital Daijisen derives 頑張る (ganbaru) from ga ni haru, to insist on one's own way, or possibly from 眼張る, and defines its main sense as refusing to give in to difficulty and seeing a thing through. Ganbatte is its te-form, which turns a verb into a request or instruction.

Related forms show up constantly: 頑張ります (ganbarimasu), I will do my best, said about yourself; 頑張れ (ganbare), the blunt imperative, which is what a crowd shouts; and 頑張った (ganbatta), you worked hard, said afterwards.

Why "good luck" is the wrong swap

Luck is external and unearned. Ganbatte points at the one variable the listener controls. Wishing someone luck before an exam concedes that the outcome is out of their hands; telling them ganbatte says the opposite, that the outcome will follow from what they put in.

Subtitlers choose good luck because English has no short, natural encouragement about effort. Do your best is stiff and slightly patronizing. Work hard is an order. Go for it is close but too casual for a teacher to say to a student. So the natural-sounding option gets picked and the meaning shifts sideways.

The part nobody translates

Ganbatte can land as pressure. If someone is already exhausted, being told to hold firm is not always kind. There are deliberate alternatives for those moments: 無理しないで (muri shinaide), do not overdo it, is what you say to someone who has clearly done enough ganbaru already.

That pairing is the useful thing to know about the word. It is not simply positive. It has a counterpart phrase for telling somebody to stop.

Why anime leans on it

Because the shonen premise and the word are the same claim. A genre built on the proposition that persistence produces results has, in ganbatte, a single word for exactly that proposition, available to any character in any scene. When a series wants to state its thesis it does not need a speech. It has a verb.

Quick answers

What does ganbatte mean?

Persist. The te-form of 頑張る (ganbaru), spelled with 頑 (stubborn) and 張る (to stretch), characters chosen as ateji.

Is ganbatte an insult?

Completely ordinary and said constantly, to colleagues, students, athletes and strangers. Neutral in register and not remotely poetic.

What does ganbatte mean in anime?

Subtitles can render it as "good luck", which quietly changes the subject from effort to fortune.