Ogier began proceedings just 2.2 seconds behind his compatriot in the overall classification and the two Citroen DS3 drivers reached the mid-morning service in Loutraki east of Athens separated by a mere tenth of a second.
The 27-year-old then built up a 10.5-second advantage over Loeb heading into the event-closing Power Stage which he maintained after both drivers posted almost identical times in a dramatic finish. Title rival Mikko Hirvonen finished third in his Ford Fiesta. Ogier bagged three bonus points for his Power Stage victory and said: "At the beginning it was difficult to find the rhythm but yesterday in the second loop we drove fast, we pushed hard."
Ogier's victory ended Loeb's run of wins in this year's world championship, following the seven-time champion's triumphs in the previous two rounds in Argentina and Italy.
It is the third time that the 27-year-old, whose last win came in Jordan two months ago, and co-driver Julien Ingrassia have triumphed and as a result Citroen have now won the last six rounds of the series.
Loeb retains the overall leadership with 146 Points. Hirvonen lies second just 17 points behind while Ogier is third a further five points adrift.
"It's been a great battle," said Loeb.
The Power Stage is a new concept this season and awards bonus points to the fastest three drivers.