Ogier, who was first on the road after Lorenzo Bertelli crashed on SS10, topped the opening two stages of the morning loop to hold a lead of 11 seconds over Latvala.
But on SS12 Latvala hit problems. The Finn, who complained of brake issues on the opening two stages, attempted to cut a corner and hit a rock, which caused a puncture.
The incident cost Latvala more than 50 seconds and promoted Hyundai's Dani Sordo into second.
Spain Rally
Ogier admits Spain crash was 'stupid'
26/10/2015 AT 18:24
Latvala wasn't the only driver who suffered problems on the tarmac stages, though.
M-Sport team-mates Ott Tanak and Elfyn Evans both had their mornings cut short.
Tanak was in third overall in his Ford Fiesta RS and was trying to put pressure on Latvala, but the Estonian hit a barrier and lost a wheel on SS11, which forced him to retire.
Evans completed M-Sport's disappointing morning on SS13, when he found himself stuck in a ditch just under halfway through the stage.
All the drama allowed Sordo to gain two places at his home rally, but Andreas Mikkelsen in the third Volkswagen is breathing down his neck, just 1.5s adrift in third.
Despite his puncture, Latvala was able to stay within touching distance of a podium, sitting only six seconds behind his team-mate Mikkelsen heading into the afternoon loop.
Mads Ostberg is a further 16.2s back in fifth, with Citroen team-mate Kris Meeke another 11.6s behind in sixth.
Meeke, like several other drivers, complained about massive understeer in the slower sections on the opening stages of the morning.
His times were steady throughout the loop but Hayden Paddon, who lost time due to a puncture on SS10, has consistently closed the gap to the Northern Irishman, which now stands at five seconds.
Under-pressure Hyundai driver Thierry Neuville is behind Paddon in eighth, with Martin Prokop almost two minutes adrift in ninth.
WRC2 leader Pontus Tidemand completes the top 10 well clear of closest challenger Jan Kopecky, who is 1m05s behind.
Esapekka Lappi's WRC2 title hopes took a huge blow after he was forced to retire following a crash on SS11, meaning Nasser Al-Attiyah could wrap up the title in Spain.
Craig Breen and Stephane Lefebvre also retired.
Follow day two of Rally Catalunya as it happens with Autosport Race Centre live from 1.15pm UK time on Saturday
Spain Rally
Ogier battles back to lead in Spain
23/10/2015 AT 16:55
WRC
French rider Cherpin dies from injuries in Dakar rally crash
15/01/2021 AT 09:23