The Yellow Wallpaper, written by Charlotte Perkins Gilman in 1892, reflects the oppressive medical and social attitudes toward women's mental health during the late 19th century. The story illustrates the consequences of the 'rest cure,' a treatment often prescribed to women, which stifled their creativity and autonomy, leading to despair and insanity.