It seems that for a long time (say, up to 90s or 00s) it was believed that Gates said that 640KB thing. Then people did some research and didn't find any solid evidence of him saying that. So for some years people were reminded that "Gates never actually said that". But during the recent 5 years or so, talks about it being true after all have been coming back. I personally haven't followed the research much to know what's the current opinion. Hmm.
At the time he is alleged to have made that statement, most versions of the then-dominant desktop OS, CP/M, were limited to a maximum of 64 KB. Weather or not he actually made that statement, at the time it would have been true.