In the terms used by Shakespearean scholars it qualifies as a comedy; along with other late comedies it's also sometimes called a romance. Neither of these terms means quite the same as it does on telly these days. Comedy is a play in which lovers are (re)united, marriage wins through, society goes on, in contrast with tragedy, where individuals fall and die. Romances tend to involve mixtures of comedy, tragedy and fantasy.