"to them, pillars and columns signify legs (as in the Song of Songs)"

The Song of Songs is one of the three books of the Bible which tradition states were written by Solomon, whom it elsewhere depicts as a wise but sinful King of Israel. 

Chronicling the courtship of an anonymous man and woman in the first-person, it has been read as an allegory for the loving relationship between God and his followers – albeit told with an unusual amount of vivid sexual innuendo.  The words Freud recalls are from Chapter Five, as the song's female voice describes the body of her lover:

His legs are as pillars of marble, set upon sockets of fine gold

Online edition of the 'Authorized King James Bible', (originally published 1611)