an exclamation used for expressing surprise, astonishment or shock US,1895 Probably a euphemism for “Jesus!”; later use is often ironic.
Gee, Officer Krupke, / We’re down on our knees, / ‘Cause no one wants a fella with a social disease. / Gee, Officer Krupke, / What are we to do! / Gee, Officer Krupke, / Krup you! — Stephen Sondheim, Gee, OfficerKrupke!, 1957