Celtic fell behind in a frantic first half after Marko Pjaca finished from 12 yards, but goals from Kris Commons and Stefan Scepovic put the visitors ahead.
Zagreb were level before half-time, with Pjaca grabbing his second from a deflected effort, and took the lead again through Marcelo Brozovic’s superb finish.
Pjaca added another for his hat-trick, firing home from 25 yards, with six goals scored in the opening 50 minutes.
Celtic halved the deficit after Josip Pivaric turned into his own net, and it stayed at 4-3 as the Scottish champions finished Group D in second place, eight points behind Salzburg, with two wins, two draws and two defeats from their six games.
There were nervous moments for the travelling Celtic fans early on as Efe Ambrose’s swiped clearance ended up in the grateful arms of Craig Gordon.
Celtic had their first chance within 10 minutes, Commons forcing a save from Dinamo goalkeeper Eduardo Carvalho with a powerful drive. Minutes later, El Arabi Hillel Soudani had the ball in the Celtic net, but the Algeria striker was in an offside position.
But the hosts took the lead on 14 minutes, with Pjaca slotting home from 12 yards having turned Adam Matthews after some pinball in the area.
Celtic were level just nine minutes later in controversial fashion after Virgil van Dijk’s deflected free kick fell to Commons in an offside position. The ball rebounded off the midfielder’s shoulder and into the net from 10 yards as Dinamo appealed for a handball.
And the visitors were ahead after 30 minutes, Scepovic flicking home from close range from a Nir Bitton head down after Commons’ free kick had struck the crossbar.
Visitors fall short
But the sides were level again as Matthews struggled to clear inside the area, allowing Pjaca to drive home low via a deflection for his second of the game.
Two fine saves from Gordon kept Celtic level after half-time, but Zagreb soon raced into a two-goal lead.
Brozovic curled home superbly from 16 yards from a Domagoj Antolic cross, before Pjaca grabbed his hat-trick with a fantastic drive that ended up in the top-right corner of Gordon’s net.
Good work from Emilio Izaguirre saw defender Pivaric turn into his own goal from six yards with 10 minutes remaining, with Deila’s side sniffing out another comeback.
And they nearly levelled in the closing stages, but Liam Henderson’s deflected effort was turned over the crossbar by Eduardo before Scepovic was denied a second by the post.
Dinamo Zagreb: Eduardo (6), Ivo Pinto (7), Sigali (5), Taravel (6), Pivaric (5), Soudani (7), Brozovic (7), Ademi (6), Antolic (7), Pjaca (9), Henriquez (6).
Subs: Simunovic (6), Cop (6).
Celtic: Gordon (5), Matthews (4), Ambrose (4), van Dijk (6), Izaguirre (6), McGregor (5), Biton (6), Johansen (6), Wakaso (5), Commons (7), Scepovic (7).
Subs: Fisher (6), Stokes (6), Henderson (6).
Man of the match: Marko Pjaca.