If I'm real, you want me.
You want cake if it's real
If I'm not, I'm a lie.
"Cake is a lie" is a phrase from Portal
If I'm real, you'll eat me.
You can eat cake if it's real
If I'm not, I'm batter.
If it's not made, it's cake batter
You might eat me raw, though not healthy.
Raw cake batter is not healthy (raw eggs)
You might eat me baked, still not healthy.
Cake is sweet and not necessarily healthy
You might want me now, but it's not the time.
People don't randomly eat cake at random times
You might want to celebrate, it's finally time.
Cake is eaten at celebrations
The achievement in one game for making me is a reference to another.
In Minecraft, the achievement for making cake is "The Lie", which is a Portal reference.