Impey's the first South African to ever lead the Tour.
Gerrans has been praised for his sportsmanship after passing the yellow jersey to Impey.
Impey made history by becoming the first African to pull on the leader's jersey following the sixth stage which was won by Germany's Andre Greipel (Lotto) in a frantic sprint.
Gerrans finished five seconds back with most of the field after 16 riders slipped off the front in the last few hundred metres.
The 33-year-old Australian dropped to third in the general classification (GC) behind Impey and Sky's Edvald Boasson Hagen.
Gerrans eased up to let Impey take yellow as a reward for helping him win Monday's third stage.
"Daryl was a huge part of me getting the jersey so I thought it was a nice gesture to be able to pass it on to him now,'' Gerrans said.
"He was an integral part of the team's time trial. I thought it was only fitting that he could spend a day or two in the jersey as well.''
Impey, who started the day on the same time as Gerrans, said it was a magical moment for South African cycling and his family including two-month old son Ayden.
"I think Simon knew how much this would change my life,'' he said after the podium ceremony.
"Seeing him lead us out today really showed how much he valued all the effort I've put in for him and he's a massive champion to do that.''
The South African, 28, said the former Australian national champion and Milan-San Remo winner could have ``easily sat on the wheels'' and kept the jersey himself.
Orica-GreenEdge team manager Shayne Bannan confirmed the plan was for Gerrans to lead-out sprinter Matthew Goss before letting Impey ``put as much space between him and Simon as possible to get the jersey''.
Director Matt White said the plan was hatched 24 hours earlier.
"Simon came to me yesterday afternoon and asked if it was okay for him to pass the jersey along to Daryl,'' he said in statement.
"They're great mates. What they've done for each other will never be forgotten.''
Teammate Brett Lancaster was quick to tweet: ``Sharing the love ... Style.''
There was no change among the GC riders with none making the front group when the bunch split at the finish line in Montpellier.
Race favourite Chris Froome, who was born in Kenya, tweeted afterwards: ``Incredible day for African cycling.''
He passed on ``kudos'' to Gerrans for setting it up.
Froome and former winner Cadel Evans rode towards the front in the final kilometres in an attempt to avoid any crashes.
"There was a lot of pushing and shoving today,'' Froome said on Sky's website.
"I can understand the sprinters wanting a clean sprint, they don't want GC riders in their way, but I can also see it from the GC riders point of view.''
The seventh stage on Friday covers 205.5km from Montpellier to Albi.
The race's first mountain stages will be held in the Pyrenees on Saturday and Sunday.
"We've been really united since we took the yellow jersey and I think we can keep it for one more day,'' Impey said.
-AAP