I've recently eaten a piece of cake, it was a chocolate with chocolate frosting and it was delicious, in case you were wondering. Cake is not the easiest thing to bake in a conventional oven. True, we only need to carefully follow a recipe for success, but that requires some work on our part to get right. Do you know what doesn't require a lot of work? The cutting some cake for yourself and eating it part; that's easy... and quite enjoyable to boot.
That's what this popular saying highlights: a piece of the cake, not the whole cake. Anyone who receives a piece of it, no matter who they are, should have no trouble eating what should be a delectable treat; it's a simple thing to do! Unless you like pie instead, in which case you might be looking for the "easy as pie" phrase.
Anyways, let's look to see around the time this idiom originated. Or we could keep talking about cake. No? Okay fine.
Phrase Origin:
According to the Oxford Dictionary, the modern meaning and phrase origin of this expression makes its appearance in Ogden Nash's Primrose Path, written in 1935, with a quote that reads: "Her picture's in the papers now, And life's a piece of cake."
"I have been training for this fight for months! I'm as ready as I'll ever be, winning the championship belt is going be a piece of cake."
"As a climber who has fought his way to the top of the tallest mountains in the world, climbing atop my small home in order to fix the satellite dish was a piece of cake in comparison."
Note: For most popular sayings and other common phrases you come across on this site, finding the precise phrase origin is difficult. What's provided is around the earliest known date the expression was being used in.
Usually the expression comes from a quote found in an old newspaper, book, poem, or play. However, if the idiomatic phrase is already being used in one of those, it's likely already a well known saying, thus it should be assumed the origins are older.
There are rare cases where determining an idiom's origin is possible. Anyways, for the most part, you'll get a rough idea on how long ago certain phrases were being used in, and can get a rough idea on how old they are.