'Sour grapes' comes from an Aesop fable. It means that you pretend not to want something that you want very much but cannot get hold of. In the fable, a fox passes beneath a bunch of grapes and tries to reach them. He tries jumping again and again, imagining all the time how juicy and good they will taste but he still cannot reach them. In the end he walks away, muttering to himself that they were probably sour in any case and he never really wanted them.