I was told by my teachers that the Americans gave quite a bit of intelligence to the Japanese before the attack on Pearl Harbor. I find that hard to believe but it seems plausible considering the US may have needed a reason to enter the Pacific war. I hope my teacher was just a conspiracy freak.
I went to a Catholic US private school. My teacher was born in the 60s. My great grandfather served in the Pacific, and it affected him and his relationships until he died. Thank you.
I have never seen good evidence that they knew the strike was coming on that day or week. But, two Admirals did successfully "war game" the Japanese attack on Pearl Harbor years before it actually happened. Admiral Harry E. Yarnell in 1932 and Admiral Earnest J. King in 1938.
So the idea that it was a total surprise and that nobody imagined that the Japanese could pull off such an attack cannot be given credit.
Admiral King was chosen as Commander in Chief of the Navy in early 1942 (and a bit later Chief of Naval Operations).
It is interesting to note that the Japanese also war gamed the Battle of Midway (June 1942). The officer who played the Americans correctly predicted that they would place their carriers to the North East of the island to lay in wait for the Japanese fleet and subsequently cause great damage to it. Over his strong protests, his ideas were disqualified by the judges.
I'm posting partly to answer the question, and partly to ask for help finding a source.
The US knew that the Japanese fleet had left port, but did not know where it was going. The biggest surprise of Pearl Harbor was that the Japanese were able to cripple the US Pacific fleet in one morning, and could do it without being detected, not that Japan would attack the US.
My source for this is something I could use help finding. I used it in my (now lost) undergraduate thesis, so I know it actually exists. Harry Hopkins gave a speech at a dinner for important business leaders in New York just a few days before the attack - December 4th? At the dinner, he states that the Japanese could attack anywhere in the Pacific any time in the next few days, and to prepare themselves for mobilization.
THIS DOES NOT MEAN THAT FDR KNEW ABOUT THE ATTACK. Plans for mobilization had started years earlier, so view Hopkins' comments in that light. Everyone knew tensions were high with Japan - that's why the Japanese ambassadors were having emergency meetings with the State Department.
Best book on this I've seen is Edwin Layton's And I Was There. The Japanese were expected to do something, sometime, somewhere. The problem was that the Japanese fleet went silent, dropped all radio contact, so no one knew where they were or what they were up to.
One major driving factor for the later controversy seems to be that Huband Kimmel, in charge of the fleet, was unfairly made the scapegoat for the disaster, and so there was bound to be a heated debate over whether he knew enough, was told enough, etc.
I am by no means an expert on this matter. However, I did read in Tim Wiener's The History of the CIA: Legacy of Ashes which briefly comments on the matter. The intelligence community had sufficient information to infer the attack was incoming, but because the intelligence community (OSS) was so geared to operational missions, analysts did not put together the information.