Kyle Vassell then struck after a great turn but, as his shot angled towards the top corner, a deflection took it behind to Celtic's relief.
Kilmarnock's intensity was incredible but McGregor took charge just moments before the break, having been earlier denied by goalkeeper Robby McCrorie.
The Celtic captain built play and advanced his team up the pitch. When he found space, he waited for Idah to move and clipped in a cross that evaded his team-mate, and McCrorie, before nestling in the corner.
It was undeniably cruel on Kilmarnock.
They responded, though, and maintained their intensity, hemming in Celtic with Innes Cameron and Brad Lyons both going close. Then, when Matty Kennedy danced into the box, Schmeichel got low down to thwart him.
Kuhn ought to have put daylight between the sides when a one-two put him through, but McCrorie brilliantly saved.
The goalkeeper could not do the same a few minutes later. Alistair Johnston clipped a ball in behind and Kuhn seized on it, sprinting away, and flashing in a devastating finish. The German seems unstoppable right now.
Celtic took the points once more. Their quality ultimately told but this was by a distance their sternest domestic examination of the campaign.