In 1958, during their summer vacation, Danny Zuko (John Travolta) and Sandy Olsson (Olivia Newton-John) meet at a beach. Scenes from their holiday are shown, but then the summer ends, and Sandy and Danny say their last good-byes. Danny seems to not want to let Sandy go, but Sandy is due to return to Australia. She is upset, thinking that this is the end of their romance and that they will never see each other again. Danny tries to comfort her by telling her that "it's not the end, it's just the beginning".
However, Sandy's family has a change of plans and does not return to Australia, but Danny is unaware of this. Sandy enrolls at Rydell High School as a foreign-exchange student, where Danny is a student, as is Sandy's new friend Frenchy (Didi Conn), a member of the schoolgirl clique "The Pink Ladies."
Danny is the leader of the boys' gang, "The T-Birds." Kenickie, second-in-command of the T-Birds, encourages Danny to tell them what he did over the summer, while the Pink Ladies likewise persuade Sandy. Through "Summer Nights" Sandy and Danny describe their vacation, and it is made clear that Danny is exaggerating; at the time, however, neither is aware of the other's presence at the school.
Encouraged by the preppy school spirit girl, Patty Simcox (Susan Buckner), Sandy joins the Rydell cheerleaders. The Pink Ladies decide to reunite Danny and Sandy, but Danny wants to protect his cool image, and his behavior towards Sandy causes her to storm off in tears. Danny stares after her for a moment, but then quickly turns back into a cool guy and goes off with his friends.
Frenchy attempts to cheer Sandy up by inviting her to a sleepover at her house with the rest of the gang; Sandy comes along, but Rizzo soon gets fed up with Sandy's goody-two-shoes behavior: Sandy chokes on a cigarette, cannot stand the taste of wine, and is horrified at the idea of having her ears pierced. Frenchy insists and takes her into the bathroom, but Sandy vomits at the first sight of blood. Frenchy announces to Jan (Jamie Donnelly) and Marty (Dinah Manoff) that she is dropping out of Rydell and going to beauty school, which she calls a very strategic career move. Rizzo (Stockard Channing) has had enough and lampoons Sandy, and even Frenchy joins in, singing the sarcastic "Look at Me, I'm Sandra Dee."
The T-Birds arrive outside Frenchy's house. Rizzo leaves the sleepover and she and Kenickie (Jeff Conaway) flirt, then Kenickie invites her into the car, and dumps the other T-Birds. Danny leaves of his own accord while Rizzo and Kenickie drive off together and the other T-Birds go for pizza. Marty, the flirtatious member of The Pink Ladies, decides to write to one of her (numerous) pen pals, while Sandy goes outside, and decides that in spite of everything, she still loves Danny, singing "Hopelessly Devoted to You", a poignant love song that was added for the movie and was a big hit as a single.
The scene shifts to Rizzo and Kenickie making out passionately in the back seat of his new car. They plan to take things a step further, but Kenickie's condom breaks. Rizzo, however, is unable to resist Kenickie, and they decide to have sex anyway. They are soon interrupted by Leo (Dennis Cleveland Stewart), leader of rival gang The Scorpions, who damages Kenickie's car.
While at work repairing the car, the T-Birds fantasize about what it will look like when it has had a paint job, singing "Greased Lightning". Soon Danny gets the other T-Birds convinced that the rickety old car could actually be a "major piece of machinery". Later, Danny meets Sandy at the Frosty Palace, and tries to apologize for his actions. He sees that Sandy is sharing a soda with Tom Chisum (Lorenzo Lamas), a jock, and decides that if that's the sort of man she likes, he's going to join the jocks to impress her.
We next see Danny's disastrous performances in basketball, wrestling, and baseball, where he keeps losing his temper. He finally finds his ideal sport in running, until the sight of Sandy distracts him, and he falls. Sandy leaves Tom Chisum to see if Danny is alright, and they are seemingly reconciled.
Danny attempts to go to the Frosty Palace with Sandy so that they can be alone and not worry about ruining his image in front of his friends. They end up discovering the T-Birds and Pink Ladies are already there and Danny finds it hard to charm Sandy without looking weak in front of his friends. After everyone leaves the malt shop, Frenchy, who has been hiding her pink hair under a scarf, imagines a guardian angel to tell her what to do with her life, who turns out to be Frankie Avalon singing "Beauty School Dropout".
Later, Danny takes Sandy to the school dance, where the TV show National Bandstand plans to broadcast live. Rizzo, now angry with Kenickie, takes the rival gang's leader, Leo, to the dance, thus enticing Kenickie to take the rival gang leader's girlfriend, Cha Cha DiGregorio (Annette Charles) who is also Danny's ex-girlfriend. The disc jockey Vince Fontaine (Edd Byrnes) is attracted to Marty and the two flirt. The dance features several well-known songs from the '50s covered by Sha Na Na. During the dance-off, Rizzo leaves in a huff, seeing Kenickie dancing with Cha Cha, and Danny and Sandy are one of the few couples still in the dance-off. But soon, Sonny pulls Sandy away from Danny, and Cha Cha starts dancing with Danny. Sandy realizes that Cha Cha was one of Danny's past girlfriends and a much better dancer. Sandy leaves the gym upset, and Danny and Cha Cha end up winning the contest. When they share their spotlight dance, three of the T-Birds run in front of the camera and moon the crowd.
Later, Danny takes Sandy to a drive-in movie. Danny tries to remove the class ring he is wearing to give it to her, but in doing so he accidentally elbows Sandy in the chest. Danny gives Sandy the ring and she kisses him on the cheek, saying she realizes now he respects her. The scene cuts to Marty and Rizzo in the drive-in's restroom. Rizzo's unprotected sex with Kenickie has come back to haunt her--she tells Marty she missed a period. One of the T-Birds, Sonny (Michael Tucci), overhears Marty accidentally proclaiming to couples making out outside the restroom to make way for the "lady with a baby", and asks Marty what she meant so she tells him the story and the rumor spreads quickly. When Kenickie asks Rizzo why she didn't tell him about it, she lies and tells him it isn't his out of anger. He thanks her sarcastically, and leaves her standing by herself. Marty has also suffered as a result of her crush on Vince Fontaine--she reveals to Rizzo that she caught him trying to put an aspirin in her Coke.
Back in the car Danny has his arm around Sandy. His hand lingers above her chest and she sees it and he starts trying to make out with her. She screams, gets out of the car, slams the door on Danny, throws back his ring (which she calls a "piece of tin"), and leaves the drive-in. Danny laments losing Sandy again, and reveals the true extent of his feelings for her in the song "Sandy" he is helpless without her.
The next scene is the race between Leo and Kenickie in the Los Angeles River. Kenickie asks Danny to be his second, and Marty gives Kenickie a lucky penny. She drops it, and as Kenickie bends down to pick it up, he gets knocked out when one of the T-Birds opens the car door. As a result, Danny has to race in Kenickie's place. Sandy sits on the hill watching the neck-and-neck race, which Danny manages to win. While she is happy to see Danny win, she has misgivings about her own image, reflected in the song "Look at Me, I'm Sandra Dee (Reprise)". As the T-Birds and Pink Ladies celebrate with Danny, Frenchy spots Sandy and goes over to her. Sandy thinks that Frenchy can help her win Danny's heart, and asks to go over to her house to take advantage of Frenchy's suspect fashion skills.
On the last day of school carnival, Danny arrives, wearing a letterman's sweater (earned through track) over his usual black attire. Sandy arrives wearing a black leather jacket, red peep-toe high heeled sandals, skintight black pants, off-the-shoulder top, curled hair, and smoking a cigarette abandoning her usual modest clothing. Danny finds her extremely attractive, falling at her feet, and then the two reunite, singing the upbeat "You're the One That I Want" (another song added for the movie, and a hit single before the movie even came out). Kenickie and Rizzo get together after Rizzo screamed from the Ferris wheel that she is not pregnant after all, and everyone sings the big finale, "We Go Together", and Danny and Sandy fly off in Danny's car and disappear into the sky.