Stolperia's answer is very nice and thorough. I would also add that Maria's character is based on Juliet's from Shakespeare's Romeo and Juliet. The stories themselves of West Side Story and Romeo and Juliet are similar, of course, because they involve "star-cross'd lovers" (people who, according to society, are not supposed to be together -- or have an ill-fated end). In West Side Story, Tony and Maria represent affiliations with two opposing gangs, and in Romeo and Juliet, the title characters represent affiliations with two dissenting families.
When the producers and directors of West Side Story decided to change the ending from the dual tragedy of Romeo and Juliet, they also, whether intentionally or not, made Maria a stronger, more dynamic character than Juliet. Maria, for example, directly confronts the warring Sharks and Jets, whereas I do not believe Juliet ever would have had the "guts" to do so with the Capulets and Montagues. However, Maria does experience some of the same conflicts and Juliet, such as whether to choose her family and heritage, or to choose the love of her life (who happens to be an "enemy"). You might refer to this dilemma as one between head and heart. Anita, Maria's best friend and her brother's girlfriend, even tries to convince Maria, with a logical statement, to leave Tony, claiming, "A boy like that would kill your brother!" (after Tony accidentally stabs Bernardo, of course). Maria, however, ultimately chooses to follow her heart -- and it is that passion that serves her well when she delivers her fiery speech at the end that reminds all of the boys that their fighting has gotten them nowhere.