FromAesop's fableThe Fox and the Grapes.Literally, "'Sour', said the fox (about therowan berries)".
The idiom comes from a Swedish translation of the fable that opted for usingrowan berries instead of grapes. Since rowan berries are actually sour, the point of the idiom is somewhat lost in Swedish.