Alaphilippe enjoyed a day free of pressure, well protected in the main pack by teammates, and then played a role in the final sprint to launch Viviani's final effort.
The 27-year-old Frenchman, who won two stages in the 2018 campaign as well as the polka dot jersey for best climber, made a late solo break to take the yellow jersey from Dutch rider Mike Teunissen over the 215-kilometer (133-mile) trek from Binche, Belgium, to Epernay, France.
Several sprinters had targeted Saturday's opening stage in Brussels but an uphill drag to the finish line proved too much for the pure quickmen.
Viviani has now posted stage wins at all three Grand Tours, including four at the Giro and three at the Spanish Vuelta. "I can't believe it".More news: GoPro camera buried in Himalayas reveals British climbers' final moments before avalanche
"It was truly the big goal of this season". We missed the first chance and put the yellow on. Today we did a flawless job, you saw how the lead-out did.
Speaking to reporters after the win, Alaphilippe was an emotional figure, "I'm speechless". I am pretty happy, I just missed this win, I had won in the Giro and in the Vuelta and now in the Tour de France.
Deceuninck-Quick Step rider Viviani superbly negotiated the dash to the line to hold off Norwegian Alexander Kristoff and Lotto-Soudal's Ewan, while former world champion Peter Sagan of Bora-Hansgrohe came fourth. Sunweb's Michael Matthews, ninth on the stage, is fifth in the general classification, while defending champion Geraint Thomas of Team Ineos is seventh, 45sec behind Alaphilippe and five seconds behind his Ineos teammate Egan Bernal, who lies sixth.
The significance of that margin was a strong topic of debate on Tuesday.More news: Lata Mangeshkar requests MS Dhoni to not retire on Twitter
"I only had to finish it off in the last 180 metres".
'People are trying to make out that it is a five-second gap and it is not. 'I didn't really do more than had to be done.
"I think in this year he's here to do exactly what he's doing and he's doing it absolutely brilliantly, and I can only stand back and applaud what he did yesterday", said Team Ineos principal Dave Brailsford, the man behind the British outfit's six Tour titles in the last seven years.
"I just need to thank the team, they were really unbelievable", Viviani said. G sat up a little bit, he thought people were trying to come over him and that is it.More news: Kanye building Star Wars-Inspired Low Income Homes
"It wasn't a five-second gap, though, was it?" he insisted.
- Man United very keen on signing 24-year-old
- Virat Kohli reacts to criticism after Indias World Cup exit
- Article image Antarctic glacial melt may cause irreversible sea level rise
- Bosco Martis shares an important message for Shahid Kapoor
- Bentley EXP 100 GT revealed as spectacular take on the GT vehicle
- Haynesworth pleas for help to find kidney donor
- 7-Eleven Day: How to get a free Slurpee on Thursday
- Wilfried Zaha’s supposed move to Arsenal faces new dilemma
- Taylor Swift Is The World's Highest-Paid Celebrity According To 'Forbes'
- Top 5 new insane Super Mario Maker 2 levels you can play