It's sometimes thought of as quite a modern phenomenon, and perhaps only applicable to screenplays. However, the three-act structure goes back as far as humans have told stories.
This view of a modern, screenwriters-only version of the form, is as unhelpful as it is incorrect, because it implies that a screenwriter requires some rigid formula; so writing within the three-act structure is a 'paint by numbers' affair.
Moreover, a perception of the three-act structure as just some modern concept used by Hollywood cookie-cutter writers, leaves it open to criticism.
The truth is that the form has developed over thousands of years and is continuing to do so. But where did it all begin?
As mentioned above, three-act structure (or a variation thereof) has existed for as long as drama has existed. Aristotle breaks the popular Greek tragedies of his day down into what is now oversimplistically (and slightly erroneously) classed as: a beginning, a middle and an end - three parts.
However, when the Roman Horace got his hands on the Poetics, he took Aristotle's work not as observations of what seemed to work well dramatically, but as a bible for playwriting; turning Aristotle's prologue, parados, episode, stasimon and exodus into five acts. He claimed that this five-act structure was the only legitimate form of drama and that was a belief that held for centuries, including the European neo-classical period of the 16th and 18th centuries.
It wasn't until the Romantics crashed onto the scene that the prescriptive, formulaic method of writing plays was cast aside in favor of a trial and error approach. The likes of Rene Pixerecourt would 'invent' melodrama, which in turn would heavily influence the first films.
However, it was Eugene Scribe who made perhaps the biggest impact, by 'creating' what came to be known as the 'well-made play'. What Scribe actually did was experiment with concepts that were already well-established: fast-moving plots, heightening of tension, escalating the action to a point of climax etc., etc.
And it's in these well-made plays that we begin to see the facets that most resemble a modern three-act structure.