Richie Porte made every effort to catch Froome, but the gap in fact widened in the closing stages and he eventually crossed the line with a 52-second advantage over his Australian teammate.
"I couldn't be happier. It has been a nervous week leading up to now but my team has done a fantastic job and to repay my teammates with a stage win and Richie coming second I couldn't have asked for more," he said.
"It's a dream come true so far. We were put under pressure. This is only the first week, so there is two weeks of hard racing to come but now we've got the yellow jersey we've got to defend it. I really couldn't have asked for much more."
Froome had never previously won a mountain stage of the race.