Here's another metaphor for what writing is like. Take the wonderful opening scene (sorry, I can't embed the video) from Love Actually (a movie about which, if you say bad things, I will fight you -- that's no lie). Billy Mack, our drugged out singer, is recording a cover version of a classic oldie but with the lyrics 'repurposed' for Christmastime. OK? So he's recording, and it takes several takes because he keeps getting it wrong. He gets more and more frustrated with himself, culminating in one of the best self-directed bits of profanity in movie history.
But then, he buckles down, dials in, and he nails it. And he knows it, he knows he's nailed it, so he keeps going, getting into the moment. And he's really creating something now! He's got it!
And then, the realization hits him, and at the 1:54 mark in the video, he says to his producer, "This is shit, isn't it?"
Even when it's going great, you're never far from the conviction that you're still producing tripe and treacle. You're never far from stopping typing, staring at the screen, and saying, "This is shit, isn't it?"
That's what writing is like.