The landmark victory set up an epic Italy-Germany quarter final.
Chiellini forced home the first goal from close range after goalkeeper David de Gea could only parry Eder's fiercely struck free-kick. Pelle volleyed in a deflected cross in injury time to complete Spain's heartbreak.
Outgoing Italian manager Antonio Conte danced along the Stade de France touchline to celebrate while his players credited his tactics for the win.
“Mr. Conte is so important as a coach because he can implement a gameplan and he becomes more important with every match,” said defender Leonardo Bonucci.
“This process which started two years ago has been essential.”
After crashing out of the World Cup in the first round, Vicente del Bosque's team have now failed to get to the Euro quarter finals.
“We have to accept the disappointment. They were more clinical than us when it mattered and got the better of us,” playmaker Andres Iniesta told Spanish television.
A series of De Gea saves kept Spain in the game, but their quest for an unprecedented third consecutive Euro title peetered out as Gianluigi Buffon saved from Iniesta and Gerard Pique late on to set up a mouthwatering quarter-final clash with Germany on Saturday in Bordeaux.
Spain had lost just one of their previous 11 meetings with Italy, including a 4-0 win in the Euro 2012 final. But the Azzurri were by far the better side in the opening 45 minutes and could have been more than one goal up at the break.
De Gea had been much-criticised for his performance as Spain's 15-game unbeaten in the Euros came to an end on Tuesday with a 2-1 defeat to Croatia which cost them top spot in Group D.