Things were looking rosy for the Imps after Alan Power had drilled them in front five minutes before the interval but the hosts ralled well in the second period with Kelly's eye for goal proving to enogh to secure his side's passage into the second round of the competition.
Kelly's first came in the 71st minute when he drilled past Paul Farman from 12 yards whilst he fired his side in front five minutes from time after the Imps' defence failed to clear a corner. He wrapped things up in stoppage time following a counter-attack.
There were five changes to the City starting line-up for this FA Carlsberg Trophy first round tie at Tamworth as manager David Holdsworth took the chance to rest a number of his players ahead of next weekend's important FA Cup with Budweiser second round match.
One of the changes was enforced with the suspended Day Gray being replaced by Peter Bore at right-back whilst with Jamie Taylor, Jake Sheridan and Andrew Boyce all one booking away from a ban, in came Colin Larkin, Aristide Bassele and Scott Garner. The other switch saw David Morgan replace Gary Mills in midfield.
It was a foul afternoon weather-wise as referee Richard Martin led the two teams out on to a sodden pitch and once the pre-match formalities were completed, with Tom Miller handed the skipper's armband, the match got underway.
City kicked off and were immediately on the offensive with full debutant Bassele sprinting down the left before seeing his cross claimed by 'keeper James Severn. Tamworth's response saw them win a corner with just 60 seconds on the clock but Lloyd Kerry over hit his centre with the ball sailing straight out for a goal-kick.
The first real half-chance of the game came in the fifth minute when George Baldock dragged a low effort well wide after a Tamworth free-kick was cleared as far as the home midfielder. The hosts remained on the attack with Scott Barrow firing a low free-kick straight at the City wall after David Morgan was pulled up for a foul.
With heavy drizzle falling from the first whistle, the poor conditions were certainly playing their part during what was a scrappy opening 15 minutes with a number of over-hit passes skidding out of play making for a stop-start beginning.
A deflected Adam Smith effort led to City's first corner in the 19th minute but this ended abruptly when Garner was penalised for a foul as he went up for Smith's delivery into the box. Severn then claimed an Alan Power header after he was picked out by a fine Peter Gilbert centre.
City were starting to get more into the game as the half-hour mark came and went with a Smith cross leading to a second corner but this, like the first, came to nothing. A slick move then ended with Smith fizzing a low effort a foot wide.
The home side then had 'keeper Severn to thank as he denied Larkin with a save with his legs after the City striker got the better of Sam Oji. The resultant corner was hurriedly cleared as the Lambs' defence looked to ease the mounting pressure.
That pressure eventually paid off five minutes before the break as, after some neat build-up play starting in defence saw Smith gain possession and after he twisted and turned, he saw his effort at goal blocked. The ball ran kindly for the Imps, however, and there was Alan Power who took a touch before finishing clinically past Severn from just inside the box.
Tamworth looked for a quick response with Paul Farman forced to tip behind a low Baldock effort whilst City's reply saw Bassele delay a pass across to Larkin who had created space in the centre-circle.
HT: Tamworth 0 Imps 1
Both teams emerged unchanged for the start of the second half with the first effort at goal seeing Bassele have a shot blocked before Larkin latched on to a long Farmn clearance before seeing his centre fly across the six-yard box. Power was then upended on the edge of the box and when he whipped in the free-kick, Larkin prodded over.
At the other end Garner was forced to clear over his own bar after Baldock fired in a low centre whilst from the corner, Farman commanded his box well to claim at full stretch.
The hosts made the first change of the game in the 58th minute with Adriano Moke coming on for Charlie Collins whilst a couple of minutes later Nicky Nicolau replaced Aristide Bassele on the left.
Bore picked up a 64th minute booking for a mistimed tackle on Cunnington whilst the hosts won their fifth and sixth corners shortly afterwards with the latter ending up seeing Moke fire wide.
Vadaine Oliver for Colin Larkin was the Imps' second switch 24 minutes into the second half but he hardly had chance to get involved in the action as, after Nicolau failed to get any purchase on a clearance, Marcus Kelly drilled in a first time effort which gave Farman no chance from 12 yards out.
City's reply saw Smith fire over after a Power free-kick was half-cleared by the home defence but the goal had clearly given Tamworth a boost with the Imps' defence forced to clear a couple of long throw-ins as the Lambs pushed for a second.
Shortly after Smith fired an 83rd minute dipping effort wide, a third and final City substitution saw Adam Boyd come on for his debut with the aforementioned winger making way.
A foul by Power on Moke gave the home side a chance from a free-kick in a dangerous position on the left and when the ball was rolled into the path of Baldock he was denied by a superb one-handed save by Farman.
The City 'keeper was powerless when the corner came in though as, after the cross wasn't cleared, there for a second time was Kelly to drill past Farman with the aid of a deflection for his second of the game.
Kelly came close to bagging a hat-trick in the closing stages of the game after Farman palmed a Cunnington effort into his path but the Tamworth midfielder fired well wide. The Fourth Official then indicated that a minimum of three minutes were to be added on.
City poured forward in numbers during these extra stages but when a ball forward was intercepted the hosts broke with the resultant counter-attack seeing Moke square for Kelly who duly slotted home his third of the game to secure his side's passage into the second round of the competition.
FT: Tamworth 3 Imps 1
City: Paul Farman, Peter Bore, Scott Garner, Tom Miller, Peter Gilbert, David Morgan, Mamadou Fofana, Aristide Bassele, Adam Smith, Alan Power, Colin Larkin.
subs: Paul Robson, Vadaine Oliver (for Larkin 69), Nicky Nicolau (for Bassele 60), Adam Boyd (for Smith 83), Jake Turner.
goals: Power (40)
bookings: Bore (64)
Tamworth: James Severn, Richard Tait, Marcus Kelly, George Baldock, Adam Cunnington, Lloyd Kerry, Duane Courtney, Scott Barlow, Charlie Collins, Sam Oji, Greg Taylor.
subs: Lee Hendrie, Tommy Wright, Graeme Law, Adriano Moke (for Collins 58), Tony Breeden.
goals: Kelly (71, 85, 90+3)
Referee: Richard Martin
Assistants: Bruce Rogers & Stuart Richardson
Fourth Official: Michael D'Aguilar
Attendance: 726 (219 City supporters)