In prehistoric suburban Bedrock, young bachelors and best friends Fred Flintstone and Barney Rubble have recently qualified as crane operators at Slate & Company. Soon to be employed, they hope to score dates. The Great Gazoo, a small, green alien exiled to Earth by his species, offers them help, although only they can see him. Meanwhile, Wilma Slaghoople, the daughter of a wealthy military veteran, wants a normal life, though her controlling mother Pearl wants her to marry suave casino owner Chip Rockefeller. She runs away from home and meets waitress Betty O'Shale at the restaurant Bronto King in downtown Bedrock. With Wilma unable to pay for her meal, Betty assumes her to be "caveless" and offers to buy her lunch. Wilma moves into Betty's apartment and gets a job as a fellow waitress.
Smitten with the waitresses, the two men invite them to a carnival, with Fred dating Betty and Barney taking Wilma. However, the couples fail to bond until both men switch dates. At one game, Fred wins an egg that hatches into a dog-like baby dinosaur, which he names "Dino". Wilma invites her new friends home to a birthday party for her father, Colonel Slaghoople, where all are shocked by her wealth. Intending to propose, Fred changes his mind after meeting Chip, who mocks his low-level job at Slate & Company. Pearl despises the three new friends, but the Colonel, glad for Wilma's happiness, accepts them and privately gives Wilma a valuable pearl necklace that her great-grandmother once wore. After the boys humiliate themselves at dinner, Wilma, nevertheless, proclaims her pride and follows them out.
Chip congratulates Fred on attracting Wilma, apologizes for lampooning Fred's job, and invites the group to his Rock Vegas resort as an olive branch. However, unbeknownst to the group, Chip plots to ensure Fred gambles so Wilma dumps him, whereas Fred sees it as a chance to win big so he can impress Wilma with money like Chip's. Gangsters Big Rocko and Little Rocko visit Chip and his girlfriend Roxie to collect a sum of money that Chip owes their boss. Gazoo overhears Chip claiming his upcoming marriage to Wilma will allow him to access the Slaghoople fortune. Considering that the plan is creditable, the gangsters agree to suspend collections until after the wedding. When Barney tries to keep Fred from high-stakes poker, Chip sends Roxie to seduce and escort Barney to an all-you-can-eat buffet.
Chip keeps Fred gambling and he misses his dinner date with the others. Betty sees Barney wipe the cream off Roxie's chest, misinterpreting the gesture as a pass. Mick Jagged comforts Betty, and they go on a date. Wilma breaks up with Fred over not spending any time with her. Chip warns her of burglaries and arranges for Fred to lose everything before slipping Wilma's pearls into Fred's pocket and framing him for stealing them. Hotel security arrests Fred for robbery, but when Barney protests that Fred is incapable of robbery, Chip accuses Barney of being Fred's accomplice and also has him arrested. Believing Chip's lies, Wilma goes back to him.
Gazoo visits the men in prison, revealing that Chip is severely indebted to the mob and hopes to solve both his problems by framing Fred for the robbery and marrying Wilma to get his hands on the Slaghooples' money. Barney slips through the bars, steals the keys, and unlocks the cell. Disguised in drag as dancers, they accidentally run into Jagged's dressing room. Barney tells Betty he loves her, and they reconcile after the misunderstanding involving Roxie at the buffet is cleared up.
Fred plans to disguise himself as Jagged in an attempt to reconcile with Wilma. Meanwhile, in the audience, Chip proposes to an unimpressed Wilma. Fred then comes on stage disguised as Jagged and briefly sings "This Isn't Love" to Wilma, apologizing for his behavior earlier before proposing to her. Knowing she still loves Fred, Wilma happily accepts, rejecting Chip, and they marry in the Rock Vegas Chapel of Love. After the pastor proclaims them husband and wife, everyone sings "Meet the Flintstones". When Jagged sings "Viva Rock Vegas" at a party, Betty catches Wilma's tossed bouquet and kisses Barney. The newlyweds drive away with Dino and Gazoo to goodbye waves from their friends, family, and even a handcuffed Chip and Roxie.
After the financial success of the first film, Universal Pictures initially greenlit two sequels to The Flintstones to be filmed back to back in the vein of Back to the Future: Part II and Back to the Future Part III. John Goodman refused to reprise his role, out of fear of typecasting. He reportedly went up to Steven Spielberg and begged himself out of doing any sequels, saying "Please don't make me do any more of these."
Brian Levant then retooled the film into a prequel. Though there were never concrete plans for a sequel, Levant later mused that it might have followed the Flintstones going
Pearl: [pointing at Fred] YOU! This is all your fault! You ruined my entire party, you idiot! You buffoon! You... you commoner! Get out! Get out of my house now!
Gazoo: Now I know this will be difficult for you, but let's think for a moment. Chip Rockefeller flew you to his casino, on his plane, to play his tables. And against odds of 247,000 to ONE, you have rolled seventeen…
Chip: Ladies and gentlemen! Ladies and gentlemen, I regret to inform you that there is a criminal in our midst... [Everybody gasps] But, before I expose him into the public. I'd like to give him a chance to step forward…
Barney: [defending Fred to everyone after he's been accused of robbery] Wait a minute, wait a minute, wait a minute! You're all making a big mistake. Fred couldn't have stolen that necklace. It was locked up in a safe...…