Dennehy has negoitiated his release from Cardiff and looked set to sign for the Gills, a club he was on loan at last season.
But in a late twist it loks as if he'll be playing for Barnet next season and joining up with former Gillingham boss Mark Stimpson.
Current Gillingham manager Andy Hessenthaler told KentOnline: 'We're disappointed a bit at his representative as the chairman had sorted things out.
Dennehy set for late switch to Barnet
'We thought we had done the deal but at the last minute he changed his mind.
'That's football and we understand because he worked for Mark last year.'