The correct way to read the analogy is:
a poet is to a poem as a baker is to a pie.
This means that just as a poet creates a poem, a baker creates a pie.
The second option you've provided, "a poem is part of a poet as a pie is a part of a baker," does not accurately reflect the analogy. Poems and pies are products of their respective creators, not parts of them.