The Slovakian surged ahead with less than 50 meters left when he pipped local favorite Alexander Kristoff to the line.
Australian Michael Matthews took third place after being boxed in during the lead-up to the sprint.
“It was not easy. It came down to a sprint, that was unbelievable,” said Sagan, who joined Italian Alfredo Binda, Belgians Rik van Steenbergen and Eddy Merckx, and Spain’s Oscar Freire in an elite club of triple world champions.
“I‘m sorry (for the Norwegian fans) but I‘m happy to be world champion again.”
It seemed that France’s Julian Alaphilippe and Italian Gianni Moscon would fight it out for gold when both jumped away from the leading group 11km from the line on the ascent to Salmon Hill, a 1.4-km effort at an average gradient of 6.4 percent.