In the final two kilometres Conti led Fausto Masnada (Androni Giocattoli-Sidermec), with the latter moving to the front in the final 500m.
Conti then took the front again, but Masnada sprinted past him, taking the stage win after 5:45:01.
“I’m struggling to understand what I’ve done. As we rode I knew it was possible and I’ve dreamt about it with the team in the last few days but there’s a huge difference between dreaming and actually doing it,” said Conti.
“I have to thank the team for all the changes and all the hard work they done this year. This is a win for everyone in the team.”
Earlier in the stage, which was the second longest one of the race, a 12-man breakaway group formed which had a maximum lead of six minutes.
They were caught by Masnada and Conti, who attacked 10km from the summit of the only categorised climb of the day with 27km remaining.
The duo had a maximum gap of 34 seconds on their chasers and seven minutes on the peloton, before Rubén Plaza (Israel Cycling Academy) attacked from the bunch and was joined by Giovanni Carboni (Bardiani CSF) and Jose Joaquin Rojas Gil (Movistar).
The trio had a gap of 35 seconds to the leading two, but Masnada and Conti proved too strong for their chasers and stuck together all the way to the finish.
Other news from today was Roglic, who was in pink since Saturday’s opening time-trial, crashing soon after the start, which resulted in him losing some time on the day.
The seventh stage will consist of a 185km route from Vasto to L’Aquila.