Keillor-Dunn smashed unerringly into the top corner in the 90th minute following a smart knock-down from Aden Flint.
There was an end-to-end start to the game at the Jobserve Community Stadium.
Inside the opening minute the U’s went close when Jayden Fevrier let fly, only to see his effort blocked.
The Stags replied with Louis Reed firing narrowly over the top following some neat approach play by Hiram Boateng.
As the lively start continued, Stags’ Lucas Akins tried a curling strike which drifted just the wrong side of the post.
It had been an encouraging start from Nigel Clough’s men, and next to go close was Boateng, who saw a decent 25-yard strike well gathered by ‘keeper Owen Goodman.
As the Stags continued to press for an opener, defender Aden Flint eased forward before drilling a shot from distance narrowly over the top.
Just when a Stags opener was looking the most likely, the U’s opened the scoring after half-an-hour.
Joe Taylor slotted neatly past Christy Pym following Arthur Read’s tee-up.
Samson Tovide came close to doubling the hosts’ leading before the break.
Keillor-Dunn came close with the Stags’ first opportunity of the second period, though he ought to have done better when shooting straight at Goodman.
Keillor-Dunn then found himself presented with another great chance from Jordan Bowery’s cross, but he headed over the top from just eight yards.
As the final 10 minutes approached, this was looking like turning into a frustrating away-day for the Stags.
However, Keillor-Dunn came to the rescue in dramatic style.
Colchester: Goodman, Egbo, Mitchell, Hall, Fevrier, Read, McGeehan (Mingi , 60), Kazeem, Chilvers, Tovide, Taylor.
Subs not used: Ihionvien, Bandeira, Smith, Akinde, Nelson, Thomas.
Stags: Pym, Bowery (Cargill, 61), Flint, Brunt, MacDonald (Williams, 81), Lewis, Reed, Keillor-Dunn, Boateng (O Clarke, 71), Akins (Johnson, 60), Gale (Swan, 46).
Subs not used: Flinders, Cooper.
Referee: Andy Davies.