What does 御免 Gomen mean?

Gomen (御免) began as a respectful word for an authority's permission. Sorry is a later sense, and the word still also means no thanks and excuse me.

Written
御免 (gomen)
Literally
Pardon, built from the honorific 御 and 免, permission or exemption. Its oldest sense is an authority granting leave; sorry is the later, everyday use.
As slang
Not an insult. It is the short form of the apology, clipped from longer phrases. Gomen nasai is the fuller form, and in ご免だ the same word turns into a refusal: I want no part of it.
In anime
Usually subtitled sorry. Dictionaries also list it as a word for entering or leaving someone's house and in a refusal meaning no thanks, so not every gomen on screen is an apology.

Gomen means sorry, and gomen nasai is its fuller form. The word started as something else: a respectful way of referring to permission granted by someone with the power to grant it.

The parts

御 is an honorific prefix. 免 is the character Jisho glosses as excuse or dismissal. The Nihon Kokugo Daijiten usage note puts the two together: 免 meant permission, and 御 marked respect toward whoever gave it.

From permission to apology

Kokugo Daijiten's first sense is that respectful reference to licensing, with a citation from the thirteenth-century Heike Monogatari. The note then traces the change. Imperative phrases such as ごめんあれ and ごめんくだされ, roughly grant pardon, came into use for mild excuses and apologies, and once they were established the short form ごめん came into use on its own from around the middle of the early modern era (近世中期).

Daijisen still lists five senses: formal licensing (天下ご免, licensed by all the realm), dismissal from a post, refusal, apology, and the greeting for arriving at or leaving someone's home. The example for the refusal is 戦争は二度とご免だ, war, never again.

Gomen nasai

The Daijisen entry for ごめんなさい gives two senses: apologizing for a mistake, and asking pardon for an imposition, as in apologizing for interrupting someone busy. Kokugo Daijiten's citations put the apology last among four uses. The others are asking permission, calling out on arriving at someone's house, and excusing oneself while pushing through a crowd.

Why sorry is only part of it

English sorry centers on regret. The dictionary history of gomen centers on leave, and an apology is one thing someone might ask leave for. That explains why the same word works at a door, in a crowd and as a refusal: in each case the word concerns being let off or let through, and in ご免だ the speaker asks to be let off: Kokugo Daijiten glosses that sense with 御免を蒙る, to beg to be excused. Sumimasen, which apologizes, gets attention and thanks, has its own page.

Quick answers

What does gomen mean?

Pardon, built from the honorific 御 and 免, permission or exemption. Its oldest sense is an authority granting leave; sorry is the later, everyday use.

Is gomen an insult?

Not an insult. It is the short form of the apology, clipped from longer phrases. Gomen nasai is the fuller form, and in ご免だ the same word turns into a refusal: I want no part of it.

What does gomen mean in anime?

Usually subtitled sorry. Dictionaries also list it as a word for entering or leaving someone's house and in a refusal meaning no thanks, so not every gomen on screen is an apology.