Jungels came out on top in a sprint finish to win his first stage in a Grand Tour as Tom Dumoulin (Sunweb) retained the leader's pink jersey in the Giro d'Italia.
He became just the second rider from Luxembourg to win a stage in the Giro after claiming victory in the 199km 15th stage from Valdengo to Bergamo.
“I had strong legs, felt good on the climbs, but wasn’t thinking of this outcome," Jungels said. "When I saw Nibali moving up on that hill, I decided to have a go and attack. The atmosphere on the climb was incredible and I couldn’t hear [sports director] Davide Bramati in the earphones, who was encouraging me from the car.
"I knew it was going to be tight, as all the riders in the group would be interested in the win and the bonus seconds. Fortunately, I also had a bit of luck, being in a perfect position in the last meters and launching the sprint from the wheel of Pozzovivo. To take a stage at the Giro in front of such a quality field is really incredible."
Thibaut Pinot (FDJ) finished third, while Adam Yates of Orica-Scott came fourth.
Many of the Giro's top contenders were still recovering from Saturday's exploits during a challenging stage 14 summit finish, with race leader Dumoulin finishing eighth.
"It was a very fast day, a high average speed," he said. "We had a breakaway in the front but a lot of teams were not happy with it and they kept on attacking."
Dumoulin had slowed the peloton down in an act of sportsmanship to allow his race rival Quintana to regain his position following his earlier crash.
"I don't want to take time on competitors when they crash or have a flat tyre or whatever," he said. "In that moment it was not really the time to go full gas."
Dumoulin remains top of the overall standings, 2min 41sec ahead of Quintana, who gained six seconds on his rival after a strong sprint finish on Sunday.
Pinot is 3min 21sec behind in third, with Italian defending champion Vincenzo Nibali in fourth 3min 40sec off the pace.
Stage winner Jungels moved up to eighth in the overall classification.
Tanel Kangert (Astana), who started the day in seventh, was forced out of the race after suffering a fractured elbow following a crash into a bollard 10km from the finish.
The riders will rest on Monday before stage 16 when the peloton faces three daunting ascents during Tuesday's 222km ride from Rovetta to Bormio.