Singing and dancing are the order of the day in West Side Story, which plants it very firmly in the realm of a musical. That means the dance numbers and vocals don't have to match anything resembling reality, and that choreography can kick in any time the characters have something to say. It also means telling the story with song and dance as well as more traditional techniques like dialogue, and West Side Story uses dancing as a tool of storytelling like very few movies before it had done.
On the most basic level, West Side Story is drama, not only because it's adapted from a stage play, but because the material is taken seriously and played straight (singing and dancing notwithstanding). If drama is conflict, we've got it. The conflict is largely between individual characters, as opposed to wars or natural disasters you'd see in a more epic kind of narrative. That helps the musical side of the film blend more seamlessly with the tragic elements, keeping those normally very different genres working together the way they need to.
As a retake on Romeo and Juliet, it's a tragedy (a subgenre of drama) as well, which was very unusual in musicals up until that point. If people are singing and dancing, it usually conveys a happy vibe, which is why most musicals tend to have upbeat endings. There are some exceptions, of course: Sweeney Todd and Cabaret come to mind. But West Side Story makes the tragedy clear from the very beginning with the whole Romeo and Juliet vibe, and all of the upbeat dance numbers in the world can't change the sense of foreboding and doom that permeates the film.