Saul Niguez's goal 62 seconds into the second half looked to have extended Spain's perfect record to seven wins from seven in Group F at Ullevaal Stadion on Sunday (AEDT).
But Kepa Arrizabalaga's foul on Omar Elabdellaoui in stoppage-time handed Norway a golden chance to deny Robert Moreno's men the points they needed.
King stepped up to beat the Chelsea goalkeeper from the spot on the day Spain captain Sergio Ramos broke Iker Casillas's appearance record for La Roja.
Spain, which won the reverse fixture 2-1 in March thanks to a Ramos penalty, dominated possession from the off but Norway created the first half's clearest chance in the 22nd minute.
Elabdellaoui delivered a rabona cross from the right but King could only head straight at Kepa.
Spain struck a seemingly decisive blow when Rune Jarstein's error saw his side fall behind.
Norway repeatedly failed to clear its lines moments after the restart and when Saul hit a bouncing ball from the edge of the penalty box, it flew through Jarstein's hands.
Fabian Ruiz twice went close to adding a second either side of King blazing over the crossbar, a missed chance that looked to cost Norway a draw.
But Kepa's error, missing the ball with an attempted punch and connecting with Elabdellaoui, allowed King to score from the spot and denied Ramos the perfect way to mark his milestone.