Despite what many people think, this trope was not originally a psychiatric one, but a purely physical one.
The ancient Greeks, who did not anatomize humans, believed that the human uterus ("hystera" in Greek) could move throughout the body to attack the other organs, causing both mental and physical disease. This belief held well into the post-Renaissance era.
By the 19th century the meaning of the word "hysteria" changed, becoming a catch-all for any psychiatric problem a woman could have; listed symptoms covered 50 pages of a Victorian psychology text and included such disparate entries as fainting, nervousness, fluid retention, "a general tendency to cause trouble" and much more. Most Victorian psychiatrists attributed hysteria to a deprivation of sex, and the treatment prescribed is, literally, a masturbation session—or as the Victorians would say—"pelvic massage until the patient as reached a state of Hysterical paroxysm"(which, at the end of the day, inspired the invention of the vibrator. And the prevailing view of it being a strictly medical device was so strong that vibrators were able to be marketed front and center as a home appliance on the Sears catalogue right into the 1920s).
In the early 20th century, though, the meaning expanded, as doctors influenced by a misunderstanding of Freud began to see all women's health problems as psychological, "not real", "all in her head", and used the word "hysteria" to describe this belief: even women suffering from cancer or angina found themselves being diagnosed with hysteria. One hospital study done in 1983 - yes, less than forty years ago - found that 10% of the women referred to the local psychiatric outpatient clinic were actually suffering from heart disease.
Although hysteria is no longer considered by psychiatrists to be a legitimate diagnosis, some older doctors still use it to describe any condition they don't recognize - but generally only in women, and usually only in middle-aged women. Women are also much more likely to be diagnosed with anxiety disorders than men are.