John Dudding, 80, died in Derriford Hospital, Plymouth, three days after being given the drug in February 2012.
On Tuesday the inquest in Plymouth was told he was allergic to penicillin.
His allergy was recorded on his notes but the doctor who prescribed it said the section on allergies had been covered up with a post-it note.
Mr Dudding, from Sutton in Plymouth, was admitted to hospital after suffering a fall at his home.
He was given a red wristband showing he had an allergy when he was admitted.
Derriford Hospital had previously admitted a "serious error" but says it is for the inquest to decide if it contributed to his death.
On Tuesday the inquest heard Mr Dudding was in a terminal phase of his life and had significant kidney injury before having the antibiotic.
The inquest continues.
A man died after being given an antibiotic containing penicillin, an inquest heard.