The informal phrase to blow a gasket means to lose one’s temper.
—Synonym: to blow a fuse, referring to a safety device placed in an electric circuit.
—Cf. also the expression short fuse, which is used of a tendency to lose one’s temper easily, but which refers to a device by which an explosive charge is ignited.
In an internal-combustion engine, a gasket is a sealing layer between adjoining surfaces—hence the phrase to blow (out) a gasket, which means, literally, to have a gasket come loose due to excess pressure.
The earliest literal use of this phrase that I have found is from River Intelligence, published in the Evansville Daily Journal (Evansville, Indiana, USA) of Wednesday 11th February 1874:
The H. S. Turner blew out a gasket at Rising Sun Saturday night, and was detained a few hours repairing.
The earliest figurative uses of the phrase to blow a gasket that I have found are as follows, in chronological order:
1-: From Cutting in on the Bliss, a short story by the U.S. journalist and author Sewell Ford (1868-1946), published in The Evening Star (Washington, District of Columbia, USA) of Sunday 12th October 1913:
“She has written her mother that she is utterly wretched, and that this precious Nick Talbot of hers is unbearable. The young whelp! If I could only get my hands on him for five minutes! But, blast it all! that’s just what I mustn’t do until—until I’m sure. I can’t trust myself to go. That is why I must send you, young man.”
“Eh?” says I, starin’. “Me? Ah, say, Mr. Robert, I wouldn’t stand any show at all mixin’ it with a young husk like him. Why, after the first poke I’d be—”
“You misunderstand,” says he. “That poke part I can attend to very well myself. But I want to know the worst before I start in, and if I should go up there now, feeling as I do, I—well, I might not be a very patient investigator. You see, don’t you?”
“Might blow a gasket, eh?” says I.
2-: From the Lawrence Chieftain (Mount Vernon, Missouri, USA) of Thursday 23rd October 1913:
Don’t Blow a Gaskett, Brother
A leading Democratic paper—the Daily Ardmorite, published at Ardmore, Okla.—in an editorial recently declared that $100,000 are going to waste in Carter county, Okla., every year because there were no sheep in the county to feed off the waste land. With wool and mutton on the free list what inducements are there for farmers in Oklahoma to go into the sheep business?—Cassville Republican.
My, how distressing! The tariff was removed from these articles less than a fortnight ago. And yet the condition stated attained in Carter county after more than a quarter century of mutton and wool tariff and a boasted “16 years of unalloyed Republican high tariff.” “Every year” reads the article. And yet the new tariff has not been in effect a twenty-fifth part of one year so far.
And “what inducements” asks this standpatter. What, indeed, is the inducement to educate your child in any profession of business? The lawyer, doctor, teacher, preacher, editor, merchant, banker, even the politician, the officeholder and the day laborer all come in open competition with the entire world with no protection against the interlopers. What’s the use.
Looks like you’d blow a gasket.—Greenfield Advocate.
3-: From A Qualifying Turn for Torchy, a short story by the U.S. journalist and author Sewell Ford (1868-1946), published in The Evening Star (Washington, District of Columbia, USA) of Sunday 29th April 1917:
You might think that would have jolted Mr. Bixby. But no. He gets the door shut in his face without even blinkin’ or gettin’ pink under the eyes. Don’t even indulge in any shoulder shrugs or other signs of muffled emotion. He just turns to me calm and remarks businesslike:
“At your service, sir.”
Now, say, this lubricated diplomacy act ain’t my long suit as a general thing, but I couldn’t figure a percentage in puttin’ over any more rough stuff on Bixby. Course, it might be all right for Mr. Ellins to get messy or blow a gasket if he wanted to; but I couldn’t see that it was gettin’ us anywhere.