Aristophanes is arguably the best-remembered of the ancient Greek comedy writers. 11 of his plays have survived in full, compared to 6 partially-surviving works by Menander and fragments by several others. But there is no evidence that he was extraordinarily popular in his time. Like others writers of his time, his theatrical plays competed for awards in festivals, and he often lost. The fact that medieval copyists chose to preserve his works is a testament to his continued appeal. Of his surviving plays:
The Acharnians (425 BC), The Knights (424 BC), and The Frogs (405 BC) are known to have won the first prize in contests. With the Frogs being popular enough to warrant a repeat performance, extraordinary for its time.
The Wasps (422 BC), Peace (421 BC), and The Birds (414 BC) took second place. A testament to Aristophanes having harsh competition in the persons of Cratinus and Eupolis. The later two remained popular to Roman times, and Macrobius (5th century AD) even commented: "Everyone knows Eupolis". Unfortunately, the Medieval copyists chose to ignore these two authors for unknown reasons.
The Clouds (423 BC) came last in a contest and was poorly received by the audience. Aristophanes later revised it considerably, adding comments on the unpopularity of the earlier version. Today only the revised version survives.
There is no information on whether Lysistrata (411 BC), Thesmophoriazusae (411 BC), Ecclesiazusae (Assemblywomen) (c. 392 BC), and Plutus (c. 388 BC) were successful or not. For all their modern fame, these plays seem to have been obscure in antiquity, resulting in few comments by later writers.
Euripides suffered much the same fate in drama- he only won the yearly drama competition four times in his life (compared to Aeschylus's 13 and Sophocles's 20+) yet almost 20 of his plays survived to today (Aeschylus and Sophocles have seven each) and many of his plays are considered well ahead of their time socially, especially in terms of complexity of female characters. This made him highly resonant among feminist authors.
William Shakespeare was a popular and commercially successful playwright of Elizabethan and Jacobean theatre at the time, and certainly a man of reasonable fame, however, in his day and age, Christopher Marlowe, Ben Jonson (who did help in promoting the Bard with the First Folio Dedication), Thomas Middleton (exceptional writers all of them) were more famous and well-regarded as the pre-eminent playwright while Edmund Spenser and Philip Sidney would be considered the pre-eminent poet.
Shakespeare always remained part of the English repertory (except for the period of the English Civil War where theatres were closed) but its only in the age of The Enlightenment that scholars, chiefly Samuel Johnson, started claiming him to be the greatest English writer. It was also in this time that Shakespeare became embraced in the Continent, especially by the Germans. Curiously in his lifetime, Shakespeare's greatest commercial success was Titus Andronicus (now regarded as a weak play, though it has its cult), while The Merchant of Venice and Macbeth, fared particularly poorly when first introduced, with less than a half dozen 17th-century performances on record. Othello was also a bomb, yet today, it is second only to Hamlet as the most-performed work of Shakespeare.
The Tempest, one of the Bard's later plays, also suffered from public disinterest. Its re-evaluation in the 19th century, and by post-colonialist critics in the 20th Century, it is now considered among the highest echelon of Shakespeare plays. Other Shakespeare plays, formerly considered minor works, like Troilus and Cressida (which became celebrated for its anti-war themes), and Coriolanus are now considered masterpieces (by the likes of Bertolt Brecht, T. S. Eliot and Harold Bloom).
Christopher Marlowe formerly regarded as Always Second Best to William Shakespeare also saw a radical reversal in reputation in the 20th Century. Authors such as Harold Bloom argue that Marlowe influenced Shakespeare. His plays became favorite among leftist writers and was popular in repertory (Orson Welles staged Dr. Faustus, Brecht did Edward II), while LGBT writers claimed Marlowe as a precursor. The fact that he was long rumored to be an atheist and, that the likes of Harold Bloom argue he died because of political persecution and conspiracy, lent him a great deal of "street cred" as a rebellious artist.
Indeed, the overall Elizabethan/Jacobean Age saw a revival in reputation. John Webster's tragedies, The White Devil and The Duchess of Malfi came to be staged (even leading to film adaptations) far more often, with the likes of T. S. Eliot arguing that Webster showed "the skull within the skin". The extreme violence which typified these plays and drove off critics (who saw them as shlock) came to be seen as cool in the 20th Century. Thomas Middleton's plays and comedies likewise underwent a revival as did The Revengers Tragedy. Today, Shakespeare is seen as the most prolific and successful of a Golden Age rather than its sole representative.
Moliere's most celebrated work is The Misanthrope, which played to poor sales and dismissal during its initial run in the 1660s.
Gilbert and Sullivan's Ruddigore was initially considered a failure when put on in 1887. This verdict is somewhat harsh, since it was run directly following The Mikado. It did actually enjoy a bit of success later on in the run, but it wasn't put in the regular Gilbert and Sullivan canon until the 1920s where it has remained ever since.
Anton Chekhov's The Seagull is an interesting example. The premier of the play in St. Petersburg was a complete disaster with the audience almost universally booing to the point where actress Vera Komissarzhevskaya ended up losing her voice trying to project over the boos and Chekhov himself having to leave the audience to take refuge backstage, fearing for his life. The reception was so bad that, the next day, Chekhov would tell newspaper writer Aleksey Suvorin that he was quitting playwriting. Years later, the initial criticism died down and people began to appreciate it with Constantin Stanislavski's direction of it going over incredibly well in 1898. Today, it's now regarded as one of Chekhov's best plays.
Arthur Miller emerged from the smash-hit release of Death of a Salesman as one of Broadway's biggest playwrights. Shortly thereafter, McCarthyism and related 50s political turmoil wreaked havoc on Miller's career. The Crucible made the mildest of profits and A View from the Bridge completely tanked, although both are celebrated today as major pieces in Miller's profile.
The musical Chicago originally opened on Broadway in 1975 and, while not an outright flop note It ran for a total of 936 performances, a little over two years, received mixed reviews and was overshadowed at the Tony Awards by the smash hit A Chorus Line. The show seemed destined to be mostly forgotten until 1996, when City Center Encores! note an NYC theatre company dedicated to mounting concert versions of obscure musicals mounted a stripped-down version, which proved surprisingly popular and paved the way for a Broadway revival a short time later. The revival was an immediate hit and continues to run as of 2015—currently second only to The Phantom of the Opera for the longest-running show in Broadway history. (Ironically, it surpassed A Chorus Line's original run in 2011.) Many critics have suggested that audiences in 1996—weary of the then-recent O.J. Simpson trial—were more receptive to the musical’s cynical view of celebrity and the media than they were in The '70s.
Sarah Kane's first play, 'Blasted', was victim to many a negative critic for its use of violence. It wasn't until her suicide and posthumous performance of her last play '4.48 Psychosis' that many of these critics withdrew their complaints.
Speaking of Phantom, it and Les Misérables also received mixed reviews when they opened in London and on Broadway. Needless to say, them being the longest running musicals of each venue has eclipsed any negative press.