The Winter's Tale was originally entered as a comedy when it appeared in Shakespeare's First Folio in 1623. This is likely because of its comic ending, which features a marriage (between Perdita and Florizel), a reunion (between Perdita and her parents, and between Hermione and her husband), and a general tone of redemption. Generally speaking, comedies were categorized as those plays that concluded with "happy" endings, while tragedies concluded with a number of deaths, including the main character.
However, critics have since determined that categorizing The Winter's Tale as a comedy is only half of the equation. While the latter half of the play is defined by notions of renewal, redemption, and reunion, the first three acts flirt with the genre of tragedy. Leontes, having convinced himself that his wife Hermione is cheating on him with his best friend Polixenes, has his wife thrown in prison and his newborn daughter abandoned in Bohemia. His son dies from the stress of the situation, and his wife (allegedly) dies in prison as well. These events are serious and tragic; indeed, there are two deaths in the play (Mamillius and Antigonus), which ultimately excludes it from the genre of comedy.
Thus, The Winter's Tale is more commonly read today as one of Shakespeare's romances – or plays that blend the genres of comedy and tragedy. Other Shakespearean romances include Cymbeline, Pericles, and The Tempest. These plays feature happy endings at the same time they begin with conflict, usually relatively dark conflict that threatens the life of one of more characters. Romances are interested in redemption and resolution, setting up characters to learn lessons over the course of the play and usually separating family members before reuniting them in the final act. While many consider the play chaotic because of its time jump and change in tone, others see it as a quintessential and masterful example of the romance genre.