This issue keeps coming up so I thought I'd throw my opinion in.
Genre: a class or category of artistic endeavor having a particular form, content,
technique, or the like
Medium: the material or technique with which an artist works
This CartoonBrew discussion debated the issue and includes a quote from Brad Bird who strongly believes that animation is a medium, not a genre.
Film is the medium through which the genres of westerns, comedies, dramas, fantasy, sci-fi and horror are produced.
Some commentors, however, made an interesting argument: that animation is definitely not a genre, but is a medium within a medium. I think I'm in that camp, too. Especially since there's so many types of animation—stop motion, CG, hand-drawn—it seems most accurate to acknowledge that the medium of film includes animation and the medium of animation subdivides into various methods.
Here are some more discussions of genre vs. medium:
Keep in mind that some genres are better suited for certain mediums. For example, although I love Japanese animation, I often find myself bored by their feature-length films. Even "Metropolis," which I think is great, put me to sleep BOTH times I saw it in the theater! I was, however, at least able to stay awake during most of it without wishing it would end. On the other hand, films like "Millennium Actress," "Tokyo Godfathers," "Paprika," "The Girl Who Leapt Through Time" and "Tekkon Kinkreet," despite their artistic qualities, seemed interminable. I couldn't figure out why.
Then I realized that the Japanese use the medium of animation for any story, not just for stories best suited for that medium. All of the films I mentioned above would have been better served as live-action films. I believe that there's no reason to tell a story in animation unless the medium can enhance the story, like "The Incredibles."
The same is true for novels, plays and movies; some stories work best as novels or as plays or as movies. There are some stories that work well in more than one of these mediums but I think those are rare. I thought "Lord of the Rings" was one of the worst and most boring books I'd ever read but I liked the movies. "Tender Mercies" was, to me, a dull movie; when I learned it began as a play, it suddenly made sense. Plays are about language; movies are about visuals. This is why so many plays transferred to the screen seem claustrophobic and dull; often you can tell that "action" was added to increase the visual interest. With "Tender Mercies," there were numerous shots of Texas vistas but it wasn't sufficient to enhance a small, non-cinematic story.
Basically, choose the best medium within which to create your work.