The reference is to the eleventh hour on the original clock devised by the Babylonians for use with their sundial.
The period from dawn to sundown, when a sundial was usable, was divided into twelve hours, so the eleventh hour came just before sunset.
In other words, if you did something at the eleventh hour, it was just before you ran out of daylight.
You’ll find this notion used metaphorically in Matthew 20:1-16.
From it we learn that even a sinner can find salvation at the last minute, even someone who procrastinates and doesn’t do what he has to do until, well, the eleventh hour.