Juventus had been seeking a fifth consecutive Coppa Italia crown but Zapata's goals after Timothy Castagne's opener ended the dream.
Atalanta will play Fiorentina in the semi-final after they thrashed Roma 7-1.
Juventus's plans suffered a blow when central defender Giorgio Chiellini hobbled off with an injury after 27 minutes. Castagne scored 10 minutes after his departure and Zapata added Atalanta's second before the visitors could recover.
Zapata grabbed his second of the night and Atalanta's third in the closing stages.
"Even the most optimistic fan could not have predicted this victory," said Atalanta coach Gian Piero Gasperini.
However Atalanta's last performance against Juventus on 26 December might have provided the basis for hope.
They led the champions until a Cristiano Ronaldo equaliser 12 minutes from time.
"It's only human not to always be top," said Juventus coach Massimo Allegri. "Now let's put this behind us and think about the next Serie A match against Parma.
"It would have been crazy to think we could win every match. It hurts to go out because we really wanted this trophy."
On Thursday night in the competition, Inter Milan host Lazio. The winner will play AC Milan in the semi-final.