I've brought this up a few times on these boards, and it's my completely unsupported belief that he never said it. The fact that such an allegedly well-known quote can't be placed - we don't know when, where, or in what context he said it - just makes the whole thing reek of urban legendry. I can't even imagine what question he would be asked in an interview or press conference that would elicit such a response.
Personally, I think it's on the same level as "George Washington never told a lie". It's something that parents tell their kids to inspire them, and they drop Gretzky's name to add a little credibility to it.
Okay, I KNOW this is eight-years late, but...well, some debates never really die.
Recently, I have been checking attribution of this quote (trying to settle the 'Michael Jordan vs. Wayne Gretzky said it' conundrum), and I'd found a Yahoo Answers page from TWO YEARS EARLIER than this discussion...and it settled things quite clearly that
#99 IS recorded saying this in a published interview: January 16, 1983 issue of
The Hockey News. Bob MacKenzie was interviewing Wayne and asking why he was taking so many shots on goal that season (he was looking like he reach the league record of 400 SOG ( spoilers he did miss it

), whereupon he said "You miss 100% of the shots you never take, even though there is only a 1-5% probability of scoring."
There's a verifiable (hopefully...library microfiche?) citation for Gretzky.
...Now I'm on a search for if/when Michael Jordan might have said it (or if it's as someone else here posed - that Jordan said something else that got conflated to the shots on goal quote).
Wish me luck! Necroposter, AWAAAAAAYY!
(oh wait, here's the link to the still extant Yahoo Answers page:
Is gretzky's quote you miss 100% of the shots you NEVER take or that you DON'T take.? | Yahoo Answers )