For all their shortcomings this season, Celtic have never been out of contention in the Premiership and despite an imperfect performance at Dens, they found a way to win.
They had lost on their three previous visits to the city this season, but started on the front foot and deservedly hit the front.
After McCracken spilled Cvancara's initial effort, a combination of Yang and Nygren bundled in.
From there, it was wave after wave of Celtic attack, but as has been the case for the majority of this season, their starting striker failed to deliver.
Cvancara shanked high and wide from about 25 yards out and then hit the post when good work from Daizen Maeda put the Czech Republic international through on goal.
He failed to capitalise on another golden chance early in the second half and was replaced by Iheanacho just before the hour mark.
His profligacy appeared to be costly when Murray swept home from the penalty spot.
Celtic have now conceded in their past eight league matches, their longest run without a clean sheet in 20 years.
And yet, with time running out, Marcelo Saracchi swung in a dangerous cross from the left and Iheanacho took advantage after Astley failed to clear.
O'Neill spoke before kick-off about how still being in contention at full-time would constitute success. His team delivered, just.