Harvick inherited the win when the Ford of Carl Edwards, who was leading, ran out of fuel as Edwards approached the final lap on the one-mile Phoenix oval.
Johnson extended his Chase for the Cup playoff lead over Matt Kenseth to 28 points from seven points by finishing third in the AdvoCare 500, while Kenseth -- beset with an ill-handling car and a botched pit stop -- finished 23rd.
Only one race remains in the season, at Homestead-Miami Speedway in Florida next Sunday. The most points a driver can earn in a single race is 48.
"Now we just need to go to Florida and have another good day," Johnson said.
Johnson needs only to finish 23rd or better next week to win the title. If he leads a lap, he needs to finish only 24th or better.
A crestfallen Kenseth said it was "a disappointing day but yet what a great season. We still got a race next weekend and we're going to try to win that."
Harvick, who also won the fall Phoenix race a year ago, is third in the Sprint Cup standings, 34 points behind Johnson.
Johnson twice narrowly escaped major problems himself. On the opening lap of the 312-lap race, his No. 48 Chevrolet was tapped by Joey Logano's Ford and Johnson lost several positions.
Johnson was bumped again on Lap 162 by Edwards, forcing Johnson to make a superb save to avoid slamming into the outside wall.
Only two drivers in NASCAR history have won six championships: Richard Petty and the late Dale Earnhardt, who each had seven.