After scoring in Saturday's 1-0 win over Barnet, the defender handed Maltese striker Daniel Bogdanovic the first round tie on a plate to spare the Tykes from an unlikely upset.
Kovacs had attempted to play his way out of trouble in the 72nd minute, but was caught in possession by Bogdanovic who crashed a superb effort past Rob Burch.
The mistake ruined what was an excellent performance by Peter Jackson's side who forced goalkeeper Luke Steele into a number of great saves.
He had to be at his best to deny Rene Howe in the first half as his 25-yard effort looked destined for the top corner.
Burch was also required to show why he is rated as one of the best goalkeepers outside the Championship with a number of smart stops.
The first of his excellent saves came just before the break when he denied Adam from point blank range and also kept out a fizzing strike from Jacob Butterfield.
In the second half Steele stopped the rapid Jamie Clarke from giving the Imps the lead when he threw himself to his left to claw away his powerful drive.
Despite the gulf between the Championship and League Two, the contest was certainly in the balance in the final stages of what was an enthralling tie.
However, after Burch had made a superb double save to deny Bogdanovic and the impressive Hammill it looked as though it would be Lincoln's night.
But Kovacs' mistake gifted Barnsley the game and despite a late push they couldn't muster an equaliser.