After leaving Blundell Park it was thought that the 27-year-old midfielder would struggle to find a club before Thursday's 5pm transfer deadline.
However an 11th hour bid from the Londoners beat the deadline, with Hamilton signing until the end of the season on non-contract terms.
'Disco' will go straight into the Bees' squad for Saturday's game against Forest Green Rovers.
Barnet currently occupy the final play-off place in the Conference.