Gabriella and Troy first meet on New Year's Eve. After being forced by their parents to attend the New Year's Eve party, they are pulled up on stage by a DJ to sing karaoke. It is clear that Gabriella is petrified of Troy's moves, but after Troy begins singing, she appears to change her mind and decides to sing Start of Something New with him. They seem to have a great time, and they proceed to spend the rest of the night together, all the way up until the fireworks at midnight. They appear to hesitate as the year changes, both vaguely considering the New Year's tradition of kissing someone as the clock strikes twelve, but Gabriella is shy and hurriedly makes an excuse to leave. Nevertheless, the pair exchange phone numbers before going their separate ways.
Upon moving to New Mexico after winter vacation ends, Gabriella is surprised to find that the school she has just transferred to, East High School, is the same school Troy attends. In an attempt to confirm her identity, Troy calls her phone during homeroom, getting them both detention but verifying that the girl he thought he recognized is actually her. They continue their friendship at East High despite being in different social circles (Troy is a jock and Gabriella has been adopted by the school's brainiacs) which is also a bonus for her because one of her best friends is on the same brainiac team. Troy shows Gabriella around the school, and they notice the sign-up sheet for the school musical. Thanks to their previous singing experience at the New Year's Eve Party, they both internally debate auditioning. They sneak into the auditions later and are surprised to see each other there. They remain together in hiding while Ryan and Sharpay, the school's brother-and-sister team of drama royalty, audition. Rather suddenly, Gabriella emerges from her hiding spot and asks to audition, and Troy abruptly jumps up and volunteers to be her partner. After being told that they are too late, they help Kelsi, the pianist, pick up her things. She plays them the song "What I've Been Looking For (Reprise)" and Ms. Darbus, the theatre teacher, hears them singing along. She then gives them a callback audition. Once everybody in school learns that they are singing together, both Troy and Gabriella receive pressure from their friends to forget about singing.
When Sharpay discovers that Troy and Gabriella, a jock (and her crush) and a nerd have a shot at being leads in the school play, she is enraged, and attempts to rally the student body around the idea that no one should do anything outside the realm of his or her clique ("Stick to the Status Quo").
Troy and Gabriella decide to do the callback despite the resistance they are facing, so their friends resort to tricking them out of it so they are more focused on "important things", such as the 'big game' and the decathlon. Gabriella is called into the science room to watch a video of an unknowningly filmed Troy lying to his friends about how and the callbacks aren't important to him. Upon hearing this, Gabriella is devastated and comes to the conclusion that things between she and Troy were never meant to work out, hence the beginning of the number When There Was Me and You, in which Gabriella indicates she has feelings for Troy that run deeper than friendship. Completely crushed, Gabriella gives Troy back the pair's audition and tells him that they won't be doing the callback. She is obviously upset, something even her friends notice, and acts very withdrawn, totally unaware that Troy is acting the same way.
Eventually, Chad and Taylor (the ringleaders of Troy and Gabriella's respective cliques) realize their mistake has made their friends extremely unhappy and eventually tell them both the truth. Taylor hints at Gabriella's feelings for Troy, saying that what really matters is how she feels about her friends "and even more... Troy." Unfortunately, Gabriella is too hurt to believe them and continues to avoid Troy. Chad, Zeke, and Jason find Troy on the rooftop garden and tell him that they know why Gabriella won't speak to him, prompting him to go apologize for what he said. However, when he arrives at her house to apologize, Gabriella asks her mom to tell him that she's busy with "homework and such." In a desperate attempt to win her over, Troy calls her and Gabriella listens as he explains what happened. He climbs onto her balcony with their sheet music, and after he sings to her, she accepts his apology Start of Something New (Reprise). The two seem to become closer then ever.
At school, Troy and Gabriella discover that the callback dates have been changed by Sharpay and Ryan to overlap with both the basketball game and the science decathlon, meaning that they would have to chose which events to attend -- sing together or compete with their respective teams. After setting off odorous chemicals and messing with the lighting in the gym, Troy and Gabriella find a way to do all three events. However, stage fright returns to Gabriella as the whole school files into the auditorium to watch her auditon with Troy, who is able to break through her shyness by reminding her that it was "just like kindergarten" and to just "look right at [him]." After winning the callback Breaking Free, Troy presses a kiss to her cheek and she giggles, blushing.
Later on, the Wildcats win the basketball championship game and Gabriella's team wins the science decathlon. Running to and throwing her arms around Troy to congratulate him, Gabriella nearly gets a kiss from him, only to be interrupted by Chad and then, moments later, Taylor. The movie ends with the pair on more than friendly terms We're All In This Together.
The movie begins with Gabriella and Troy dating and looking forward to spending summer together, as it is the first time that Gabriella has been able to stay in one place for a whole summer What Time Is It? (Summer Time). Troy promises to teach her how to skateboard, and Gabriella giggles that she has first aid training to patch herself up afterwards. However, their plans change slightly when Troy is offered a job at Lava Springs (courtesy of Sharpay's scheming) and brings Gabriella along to lifeguard. The rest of the Wildcats work in the kitchen.
Troy and Gabriella go on a picnic on the golf course, playing around and nearly sharing a kiss before being interrupted by sprinklers that were activated by a spying Sharpay. They also sing a song that Kelsi has written You Are the Music In Me with hopes of them entering the country club's Star Dazzle talent show. As time goes on, Sharpay develops her plan to pull Troy away from Gabriella—and his friends—by promoting him to a golf job where she takes lessons and monopolizing his time. She also manages to trick him into promising to sing with her You Are the Music In Me (Sharpay Version). Gabriella becomes slightly jealous and Taylor begins insisting that Troy is behaving inappropriately according to her (Taylor's) sister's "boyfriend rules".
As times goes on, Troy begins to spend more time with Sharpay, coming late to, or even skipping, dates with Gabriella. Once Troy begins ignoring his friends and Sharpay, in her plans grand finale, bans all working Wildcats -- not including 'honorary member' Troy -- from the talent show, Gabriella tells Sharpay that she has had enough. She leaves Lava Springs, breaking up with Troy and leaving him stunned and brokenhearted "(Gotta Go My Own Way)". With absence, his friends' indifference towards him becomes glaringly obvious and he realizes that he need to make some changes. He tells off Sharpay and returns to his old kitchen job, attempting to win forgiveness from his friends. However, Gabriella is still out of the picture.
The night of the Star Dazzle talent show, Troy agrees to sing with Sharpay if she will let the Wildcats do the show. Depressed, Sharpay tells him that she wishes he was doing this for her and not for his friends. He only smiles sadly, knowing that he's dedicated to Gabriella. His friends drag him away to teach him the new song that Sharpay wants to sing. An uncomfortable Troy goes up on stage alone, waiting for Sharpay to come sing with him. However, Sharpay doesn't know the song he was just taught and cannot go join him to sing. He hears Gabriella's voice accompanying him, and learns that Taylor had gone to get her from home, returning the T-necklace her gave her to its proper place around her neck.
She forgives him for everything that has happened and the two realize that they should be seizing the day and sing Everyday. Later, all the Wildcats go to watch the fireworks on the golf course and, as their friends dance around in the sprinklers, Troy and Gabriella share their first kiss, boyfriend and girlfriend once again.
Towards the end of their senior year, Troy and Gabriella are still dating and seem to be very serious about their relationship. During the championship game against West High, Troy looks to Gabriella for support and she encourages him to keep trying and, ultimately, to win Now Or Never. Later, at the celebration at Troy's house, Gabriella and Troy hang out in his tree house and discuss their futures, namely the fact that Gabriella has already been accepted by Stanford University while Troy is being pushed towards U of A, two schools that are 1,053 miles from each other. Both teens are clearly uncomfortable with the idea of such a long distance separating them, and decide to focus on the present for the moment Right Here, Right Now.
The Wildcats are later recruited to help with the school musical, Senior Year, and Gabriella mentions the idea of staging the perfect prom. Later, on the rooftop, Troy asks her to go to prom with him, both teens admitting that it is the first time they will be attending a dance together or alone, and Gabriella teaches him how to waltz Can I Have This Dance? They nearly share a kiss in the rain but are interrupted by the school bell ringing. Their relationship develops as they practice for the musical by singing A Night To Remember and Just Want To Be With You, and Troy admits that he's been talking to schools other than U of A. Gabriella also admits that she has some decisions left to make, but her mother cuts her off before she can tell Troy what she means. Gabriella learns that she has been accepted into Stanford's 'Freshmen Honors Program' and would be leaving two weeks early, missing prom, the show, and graduation. Taylor encourages her to go, but Gabriella claims that she has been considering staying in Albuquerque, obviously in order to stay closer to Troy at U of A. When Troy learns about this, from a sneaky Sharpay, he sneaks into her room with a picnic and insists that should go because she "can't put off something as great as Stanford." Although Troy's insistence does ultimately convince her to go, she finds that it is too hard for her to say goodbye and leaves without a word, planning to return for prom, the show, and graduation.
After two weeks apart, Gabriella makes a phone call to Troy and tells him that she won't be coming back because she can't handle having to say goodbye to her friends and, more importantly, him, again. She admits that she loves him (the first time it's said by either of them), but hangs up without giving him a chance to reply. She is later surprised when Troy shows up at Stanford on the night of prom back in Albuquerque. He explains that "if [he's] going to have a last dance at East High, it's going to be with [her]" and manages to convince her to come back to East High with him for the show and graduation by singing Can I Have This Dance? (Reprise). At the end of 'Senior Year', Troy reveals that he's made the decision to attend UC Berkeley to study both basketball and theater, a school that is only 32.7 miles away from "the person who inspires his heart." Gabriella is extremely touched by this, and, after graduating, the two head off to college, still together.