Sense of "molasses" is first recorded 1690s (the connection may be from the use of molasses as a laxative, or its use to disguise the bad taste of medicine); that of "anything too sweet or sentimental" is from 1771. Related: Treacly.