Johnson was third on the late restart, but he surged past leader Denny Hamlin while giving a little bump to Harvick. He side-drafted Harvick and easily got away for his 77th career victory, which put him ahead of Dale Earnhardt Sr. for seventh place in NASCAR history.
"We saved the best for last, for sure," Johnson said.
Johnson finished with his fastest lap of the race to claim his second win of the young season, adding Fontana to Atlanta. The six-time series champion has won three of his past eight races after a 20-race winless skid in his Hendrick Motorsports Chevrolet.
Harvick was in position to win for the second consecutive week before second-place Kyle Busch blew a tire with two laps to go, which forced the race into overtime. Hamlin got off pit road first for his first lead of the race, but Johnson's fresh tires gave him the speed to get ahead.
"I knew we had a great car, and the caution fell at a bad time," Johnson said. "The run before, I just didn't have the tires on the car to race with those guys. I got a great run off of Turn 2, and I thought, 'Man, I've got a shot at this thing,' which I didn't expect to have. Harvick has been so fast."
Johnson is from El Cajon, just outside San Diego. He won at Fontana in 2009 and 2010 but hadn't finished higher than ninth in his past four races at his closest thing to a hometown track, one hour east of Los Angeles. His sixth victory increases his career record.
Harvick finished second to Johnson in the ninth consecutive time that the California natives have occupied the top two spots.
"That was the worst it's taken off on the restarts," Harvick said of the last lap. "But we weren't good on the restarts for four or five laps, unless we were by ourselves. We weren't able to drive it in like I needed to. Just didn't have the front tires turning, and then the back wouldn't grip. Still a good day for us."
Martin Truex Jr. was in contention until late contact with Logano, who left Truex furious.
The combination of Auto Club Speedway's aged asphalt and NASCAR's new low-downforce package led to excellent entertainment value. Fontana showcased uncommonly close racing and multiple passes on one of the series' fastest tracks.
Johnson soared to the win with the Superman logo emblazoned on his hood to promote Warner Bros.' upcoming "Batman v Superman: Dawn of Justice" film. Johnson later donned a red cape and grinned at the cheesiness.
ROUGH WEEKEND: Busch's blown tire while he was in second place capped a hard-luck weekend for the defending Sprint Cup champion, who won here in 2013 and 2014. A day after Busch blew a tire while leading on the last lap and closing in on his fourth straight Xfinity Series victory, his streak of eight straight top-five Cup finishes ended in dismaying fashion.
QUICK START: Harvick started up front and on the opening lap took the lead from Austin Dillon, the pole-sitter and Saturday's Xfinity Series race winner, in a jaw-dropping finish. Harvick and Carl Edwards soon picked up right where they left off last week in Phoenix with a photo finish after trading the lead throughout the early laps.
BIG CRASH: Kyle Larson was unhurt after a frightening solo crash that sent his entire car flying into the air on the 48th lap. The Northern California native hit the wall head-on when he blew his left rear tire, but he climbed out after landing on his wheels.
BAD CRASH: Danica Patrick hit the wall hard with 79 laps to go after contact while passing Kasey Kahne, who was a lap down. Patrick and her team were angry with Kahne for the bump, with Patrick calling Kahne "pretty desperate."