I've heard it attributed to him a lot, often the context given is that it was after the Bay of Pigs. Looking around a bit I can't seem to find a solid source, just people parroting the quote.
Vincent Bugliosi (former prosecutor in the Charles Manson trial, author of a careful, skeptical book about the Kennedy assassination), writes:
Whatever the CIA's short laundry list of dissatisfactions (some merely illusory, some real) with Kennedy, as I discuss later in the anti-Castro Cuban exile section of this book, Kennedy was highly disturbed with the CIA for its incompetence and its having misled him on the probable success of the Bay of Pigs invasion in 1961. Perhaps the most famous alleged quote from Kennedy about his animus toward the CIA after the Bay of Pigs debacle was that he wanted "to splinter the CIA into a thousand pieces and scatter it to the winds." But in the two and a half years after the attempted invasion he never did anything remotely close to this, and it is not known to whom he supposedly said these words. The New York Times only said that Kennedy made this statement "to one of the highest officials of his administration."
Vincent Bugliosi, Reclaiming History: The Assassination of President John F. Kennedy, page 1189.
The New York Times article in question is: "C.I.A.: Maker of Policy, or Tool?", New York Times (April 25, 1966). It is on the second page of the article, under the heading of "Kennedy's bitterness," and the specific quote there is "splinter the C.I.A. in a thousand pieces and scatter it to the winds."
This appears to be the original source of the quote in print? In any case, it is an interesting round-about: the article is really about public perceptions of the CIA, and how they get blamed for lots of things there isn't any evidence for. Not entirely ironic that this quote is most used by people trying to establish a CIA motivation for killing JFK.
Which is to say: the quote's origins appear to be an anonymous source in the New York Times in 1966, which credits it (without saying whether it is direct or indirect credit) to a high-level administration official. It's not entirely implausible. But it's got a lot of gauze around it, as far as quotes go.