You seem to be thinking of this quote by Randall Jarrell:
A good poet is someone who manages, in a lifetime of standing out in thunderstorms, to be struck by lightning five or six times; a dozen or two dozen times and he is great.
The quote comes from his 1953 book "Poetry and the Age", of which the text is available on the Internet Archive. Specifically, it's in a section titled "Reflections on Wallace Stevens", and the whole paragraph is this (courtesy of Wikiquote):
How necessary it is to think of the poet as somebody who has prepared himself to be visited by a dæmon, as a sort of accident-prone worker to whom poems happen — for otherwise we expect him to go on writing good poems, better poems, and this is the one thing you cannot expect even of good poets, much less of anybody else. Good painters in their sixties may produce good pictures as regularly as an orchard produces apples; but Planck is a great scientist because he made one discovery as a young man — and I can remember reading in a mathematician’s memoirs a sentence composedly recognizing the fact that, since the writer was now past forty, he was unlikely ever again to do any important creative work in mathematics. A man who is a good poet at forty may turn out to be a good poet at sixty; but he is more likely to have stopped writing poems, to be doing exercises in his own manner, or to have reverted to whatever commonplaces were popular when he was young. A good poet is someone who manages, in a lifetime of standing out in thunderstorms, to be struck by lightning five or six times; a dozen or two dozen times and he is great.
The context of the quote is that Randall Jarrell is of the opinion that some of Wallace Stevens' poems are great, and some are not. This is Jarrell's way of explaining why some poems come out better than others even by the same author.