The lengthened-grade form *ǵhwēr- became Greek θήρ thēr "wild beast, venomous animal". The diminutive of this, θηρίον thērion, was adjectified and then nounified into θηριακή thēriakē "antidote against venomous bites", and was borrowed into Latin as thēriaca, which became Old French triacle "antidote for poison". This was borrowed into English as treacle. The "molasses" meaning dates from 1694. The connection between "molasses" and "antidote" might be due to the fact that molasses was used to disguise the bad taste of medicine.
'What did they live on?' said Alice, who always took a great
interest in questions of eating and drinking.
'They lived on treacle,' said the Dormouse, after thinking a
minute or two.
'They couldn't have done that, you know,' Alice gently
remarked; 'they'd have been ill.'
'So they were,' said the Dormouse; 'VERY ill.'
Also, enjoy this language map of Toronto.