Results long stayed provisional as the race jury looked at the photo finish to determine the winner of the 213.5-km flat ride from Troyes.
Kittel was declared the victor ahead of Boasson Hagen (Dimension Data) by just six millimetres and joins Erik Zabel as the German rider with most stage wins on the Tour (12).
"It's nice to be now one stage win shy of the record. I'm enjoying every single victory. I just concentrate on my job. It's just cycling that makes me happy," said Kittel.
Australian Michael Matthews (Team Sunweb) was a distant third as Chris Froome (Team Sky) retained the overall leader's yellow jersey.
Kittel also snatched the green jersey for the points classification from Arnaud Demare (FDJ) after the French champion, who had been ill overnight, was not a factor in the sprint.
Kittel has 197 points to Demare's 182.
"It is the closest win of my career. What a difference six millimetres can make between a big joy and a big disappointment," said Kittel.
"I focus on the green jersey. These victories bring me big points.
"I'm happy that I managed to throw my bike just the right way."
Until the final straight, the day had gone without any drama -- the usual scenario for long, flat stages. Four riders broke away from the gun, but their advantage was controlled by the sprinters' teams and the fugitives were caught with the line in sight, leaving it to the big-thighed sprinters to fight it out for victory.
Overall, Froome still leads team mate Geraint Thomas by 12 seconds and Italian Fabio Aru (Astana) by 14.
Saturday's eighth stage will be one for the breakaway riders as it takes the peloton over 187.5km from Dole to the Station des Rousses in very hilly terrain.