Implies that a promised reward for one's work is false, with the one proffering the reward never intending to give it in the first place, possibly because the reward never even existed (see also: "there is no spoon"). This phrase can be used to express grief or frustration regarding any situation where there is an imbalance between effort and reward. This phrase was popularized by the game "Portal" by Valve Software Corporation.
During the game, GlaDOS, an artificially intelligent operating system and the game's passive-aggressive guide, uses the reward of cake as a motivating factor in an attempt to manipulate the player. It is first mentioned during the "impossible puzzle room", where she urges the player to "quit now and cake will be served immediately". In a later stage, the player can access a "hidden" area of the testing chamber to find a previous test participant had scrawled "The cake is a lie!" among other warning messages. Cake continues to remain the promised reward for completing the test and/or obeying GlaDOS, particularly in the final stages of the game. Finally, in the ending song, GlaDOS cheerfully sings about how "there's no sense crying over every mistake, you just keep on trying 'till you run out of cake."
In the game, cake serves as a carefully calculated motivational device, but there are suggestions that it also serves as an essence of humanity--the ability to eat cake, taste it, and experience emotional pleasure from it--which a computer cannot experience even with artificial intelligence. In this less commonly-used sense, the phrase "the cake is a lie" can also imply that one's emotions or the basis of one's emotions are false, with cake representing emotion, emotional basis, or emotional capability.
Common Usage Example --
Bob: "We worked hard this quarter, where's the raises you promised?"
George: "Sorry, Bob, the company is making some cut-backs; no raises this year."
Bob: "So the cake is a lie. Why did we have to work so hard, then?"