The result at the Estadio Vicente Calderon keeps Les Bleus level with the world and European champions at the top of the group.
The striker’s late heroics wiped out Sergio Ramos’s 25th-minute goal as a second-half resurgence by Didier Deschamps's young side left Spain, who missed a penalty through Cesc Fabregas in the first half, stunned.
Spain, unbeaten at home since 2003, started with the same confidence on the ball that saw them beat France 2-0 in the Euro 2012 quarter-finals.
Santi Cazorla – on early for the injured David Silva – frequently found space on the left touchline, and only the scrambling defence of Mathieu Debuchy and Laurent Koscielny denied the Arsenal playmaker a series of shooting chances.
Mamadou Sakho was the only available centre-back to partner Koscielny, and France’s lack of depth in the position was exposed by Spain midway through the first half.
Ramos rose unmarked to meet a Xavi corner and the ball came back off the post before first Pedro then Ramos beat French defenders to the ball - and the Real Madrid defender stabbed home from five yards.
France should have levelled the scores with minutes to play in the first period when Franck Ribery headed a whipped free-kick back across the face of goal and Jeremy Menez finished at the back post, only to be denied by the offside flag.
Replays suggested that the winger was behind Ribery when the ball was played across.
In an instantaneous response, Spain broke through Pedro who was taken out by a mistimed Koscielny challenge and Lloris turned Fabregas’s subsequent shot around the right-hand post.
Minutes later Lloris again kept his side in the game, saving a Pedro snap-shot with his legs before recovering spectacularly to turn Fabregas’s rebound wide.
The second half saw a rejuvenated France press Spain’s midfield playmakers and break from deep – with Karim Benzema a constant threat to a Spanish backline missing Carles Puyol and Gerard Pique.
Ribery looked increasingly dangerous and came closest after cutting into the box and sending a driven shot just past a helpless Casillas’s right-hand post with 15 minutes to play.
With the clock ticking down, Benzema cut into the right side of the box and beat his man before weighting a perfect ball across to an unmarked Sissoko, but the substitute was unable to control his volley.
However it was Benzema’s replacement who would have the last say when, four minutes into injury time, Ribery carved himself enough space to pick out Giroud with a perfect curling cross.
The Arsenal striker expertly guided the ball into the far corner, keeping his side’s unbeaten World Cup qualifying record intact.
BELARUS 2-0 GEORGIA
Belarus ran out 2-0 winners over Georgia in Minsk to climb off the bottom of Group I.
Renan Bressan opened the scoring on six minutes and Stanislav Dragun added a second on 28 minutes.