Stephen Kenny’s side had led on no fewer than three occasions courtesy of David McMillan’s second hat-trick in the space of 96 hours.
However, Tony Cousins’ relegation battlers were denied what would have been a priceless point in their battle against the drop when Kilduff headed home from a Daryl Horgan cross deep in stoppage time.
The result means the champions are nine points clear at the top going into their Champions League clash with Iceland’s FH Hafnarfjardur next Wednesday, albeit nearest challengers Cork City have two games in hand.
The home side were in front as early as the 11th minute when McMillan headed home from a Patrick McEleney cross.
Longford silenced Oriel Park 10 minutes before the break, however, when Lee Duffy turned in a Kealon Dillon corner to level matters with what was the visitors’ first shot.
Dundalk restored their advantage four minutes into the second half when McMillan glanced past Paul Skinner from Sean Gannon’s deep cross.
Once again the visitors hit back though with Noel Haverty bundling home from Dillon’s corner on 55 minutes.
McMillan did manage to restore his side’s lead once more on 62 minutes when he completed his hat-trick with yet another header from a McEleney cross.
However, Dundalk’s joy was once again short-lived as Longford equalised for a third time on 74 minutes.
A free into the box from Dillon deflected off Andy Boyle but despite Gary Rogers keeping it out Rhys Gorman was on hand to tap home the rebound.
That looked like being enough to earn the visitors a point until Kilduff stooped for what could prove to be a huge goal in this season’s title race.
Rogers; Gannon, Gartland, Boyle, Massey; Mountney (Meenan 60), Finn, O’Donnell, Horgan; McEleney (Kilduff 79); McMillan (Shields 93).
Skinner; Dillon, Gorman, Haverty, O’Reilly, Powell; McGlynn (O’Connor 66), Gannon, Hughes; Simon, Duffy (O’Sullivan 63).
D McKeon (Dublin).