When we use the phrase "sour grapes," we're indicating someone is disparaging something just because they can't have it. For example: "It's just as well they didn't have that dress in my size. It's actually quite gaudy."
This expression comes from the fable "The Fox and the Grapes," attributed to our old friend Aesop. Many of his stories consisted of animals displaying humanlike qualities.In this tale, a starving fox tries several times to reach a bunch of juicy grapes dangling just out of reach but is unsuccessful. To assuage its disappointment, it says to itself, "I'm sure they were sour." Although Aesop is given credit for this story, its first known English usage wasn't until 1760 [source: Martin].
Interestingly, some scholars say a better translation of the fable from Greek to English would result in the phrase "unripe grapes" [source: Martin]. But, "Those must be unripe grapes" just doesn't have the same ring to it.