A grammar Nazi is someone who corrects another's grammar in a way the accused feels is overly harsh. From the OED:
Nazi n. 2.b. hyperbolically. A person who is perceived to be authoritarian, autocratic, or inflexible; one who seeks to impose his or her views upon others. Usu. derogatory.
Their first citation is for Safety Nazis by P. J. O'Rourke in Inquiry from 1982:
The Safety Nazis advocate gun control, vigorous exercise, and health foods.
The earliest example of grammar Nazi I found was in Usenet group comp.sys.apple2 in January 1991, by "The Unknown User" correcting another's spelling:
Ok, I posted a message on this subject earlier with sort of a "rediculous"
ridiculous. I'm a card carrying member of the Spelling and Grammar Nazis of America.
As Barrie England commented:
Regardless of its orgin, it's an abominable term, which displays both historical insensitivity and linguistic illiteracy.