To "blow a gasket" means that someone has lost control of his temper or become very angry. In most instances, the idiom means that the person has become enraged very quickly, which harkens back to the literal meaning of the phrase. Literally, when a gasket is blown, steam is released almost immediately.
The phrase comes from the mechanics of engines. A gasket is a seal on an engine that is fitted between two pieces of metal. The gasket's purpose is to keep liquids, usually gasoline or water, from leaking around the metal fittings. When a gasket blows, liquid seeps out from between the pieces of metal, usually creating steam when the liquid hits the hot metal. This recalls the idiom of "steam coming out his ears," which also describes someone who is very angry,
There is no warning in the machinery that a gasket is about to blow. When it blows, which means it breaks or comes lose from its place between the pieces of metal, it happens suddenly. When a person is said to blow a gasket, the anger that is being described usually comes about with no warning that the person was on the verge of becoming so furious.
A very similar idiom is to "blow a fuse." A fuse would blow in a building's power system when an electrical circuit became overloaded. As when a gasket is blown, a fuse blows suddenly, and there is little warning before it happens.
Both phrases are believed to have their origins in the United States. To blow a gasket probably entered common language as a figurative phrase about the time that the use of automobiles became common. Most people, at one time or another, would have seen what happened when an automobile blew a gasket. To blow a fuse would have come into common usage as more and more people had electrical systems in their home and saw what happened when a fuse blew.
As idioms go, both blow a gasket and blow a fuse are relatively modern additions to common English language. As machinery that employed gaskets, namely car engines, and electricity systems using fuses didn't come into use until the late 19th and early 20th centuries, the phrases' literal meanings are probably less than a hundred years old as of 2011. Their uses figuratively are much younger still because they would not have entered common usage until most speakers were familiar with what it meant when a gasket or fuse blew. In comparison to proverbs and idioms that have been a part of the language for centuries, this makes both phrases rather modern.