The idiom is actually "Be the X" or "Be X." "Be the pie" in the sentence you quoted is just the idiom as applied to that one situation. It's half-joke, half-serious.
The idiom is a parody of various schools of performance that encourage the student to abandon conscious control or preconceptions and pay attention to the task in a Zen-like manner. For example, in Method acting, you are taught not to "act like the character" but to "BE the character". Going back to the teachings of Constantin Stanislavski, this approach cultivates the actor's ability to act naturally and spontaneously, just as one acts in real life, as opposed to "classical acting", which taught gestures, intonations, and analysis of the script in order to create deliberate, consciously controlled effects. In Method acting, if the character is supposed to be feeling a certain emotion, the actor should genuinely feel that emotion during the performance. This makes emotional expression truthful, as opposed to merely "indicated" as in classical acting.
Sport has a similar need to let go of conscious control in order to get your best performance. In the 1970s, the book The Inner Game of Tennis by Timothy Gallwey became popular among both tennis coaches and acting teachers, for its techniques of getting the conscious mind "out of the way" so one's unconscious talents could respond spontaneously to the situation. The most famous exercise of this book was to watch the rotation of the tennis ball in order to give the conscious mind a sort of distraction while enabling the unconscious mind to see the motion of the ball and orchestrate all the precise muscular movements needed to hit it accurately.
Martial arts involve the same difficulty. One of the earliest famous "Be X" exhortations is Bruce Lee's "Be water, my friend" from 1971.
This whole style of teaching and coaching was briefly parodied in the 1980 movie Caddyshack. A pro golfer says to his caddy, "Danny, I'm going to give you a little advice. There's a force in the universe that makes things happen. All you have to do is get in touch with it. Stop thinking, let things happen, and be the ball." Danny finds it hard follow this advice, leading the golfer to complain, "You're not being the ball." This made "Be the ball" into a catchphrase in U.S. culture.
I don't know if any sports or acting coach ever really said "Be the ball," but this kind of teaching and coaching did reach some truly silly excesses in the 1970s. There's a famous, possibly not-entirely-true story about Dustin Hoffman and Laurence Olivier working together on Marathon Man in 1976. Hoffman came in for work disheveled and unrested. Olivier asked what happened, and Hoffman said he had stayed up three days and nights just as his character had. Olivier said, "Why don't you just try acting?" It should be noted, though, that Method acting really did revolutionize acting in the mid-20th century, producing acting performances more emotionally powerful and genuine than anything anyone had seen before.
Not to be confused with this.
Be the pie is idiomatic, and means to become like the pie by entering the same state as it. If one is as the pie is, then concentration and baking skill will improve, by virtue of understanding, from the pie's perspective, the necessary qualities and processes for being delicious, as well as forgetting about all of the other things which commonly distract or worry us. The phrase can even go as far as meaning having a profound connection to some 'essence of pie'.
This is a twist on the common sports advice / trope be the ball.
You'll get a great (and hilarious) explanation if you watch this clip from the classic movie Caddyshack.
I need to be the pie, in other words, I need to imagine that I am the pie. I need to look at things from the pie's perspective – Am I sweet enough? Do I need more sugar?
It sounds like a very Zen approach to cooking.
The clue is in the earlier part of the sentence:
I have to get close to what I'm making [...]
The sentiment expressed is this: "Really get intimately familiar with what you are making. Let it get under your skin." This is what method acting is all about - the actor pretends not to be an actor, but to be the subject he is portraying. To act scared, you have to be scared. To act surprised, you have to be genuinely surprised. And to make a great pie, you have to,
you know, be the pie.
The expression "you know" in this sentence fragment is sometimes called a "filler" or "discourse particle". You could get by without it - but it creates a little bit of tension or anticipation. At the same time, it is often just used by the speaker to collect his thoughts - to come up with the perfect expression. The speaker believes it buys him time. In this case, without those two words the sentence would be come quite awkward; it might need to be rephrased like this:
I have to get close to what I'm making; I have to become one with the pie.
The filler "you know", in this case, makes the words flow more easily - in keeping with the sentiment expressed.
I think that the idea behind this statement, and the related ideas that other answers have shared, became popular in English because of this quote from Zen in the Art of Archery:
In the case of archery, the hitter and the hit are no longer two opposing objects, but are one reality.
In Western thought, there's a bit of poking fun at the idea, as you can see.
I'm not convinced that method acting is behind it, but of course that's as valid a point of view as this one.
Dr. Martin Luther King, Jr. once said, "Be the change you want to see in the world." This means if you want the world to be a more polite place, be polite yourself. If you want more understanding, be understanding.
It is an idea that by embodying the aspects of what you want to change, you can change the world a little bit at a time. Understand what it is you want changed, and you can determine how to do so.
Sometimes we want a world of peace and tranquility, and sometimes we want a world with a flakier, buttery crust.