Ogier had begun the day with a five-second advantage over Mikkelsen, but went off and became stuck in a snow bank on the Lesjofors stage.
The world champion lost four and a half minutes, and will drop outside the overall top 20.
"I just went into the snow bank and got stuck. It was on a slow corner. I was not really concentrated. It's a stupid mistake," said Ogier.
"I will do my best [to recover] now. I don't know what is possible but I guess it's going to be hard."
Latvala was quickest on the stage and is now just 0.6s behind new leader Mikkelsen.
Rally Sweden as it happens on AUTOSPORT Race Centre Live
Ott Tanak, who was on Latvala's tail overnight, lost a little time with a spin on Lesjofors and is now fifth, part of a three-way podium fight with Mads Ostberg and Mikko Hirvonen in which all three are covered by 3.8s.
Hyundai driver Thierry Neuville also had problems on SS7 and looks set to retire from leg two. He had been running seventh.