I do not believe there were any periods of time in the war where America thought we would lose the war. There were of courser periods of time when Americans were worried about being attacked, or were losing faith in certain situations. For example after the Japanese attack on Pearl Harbor, the entirety of the West Coast of USA went in to military overdrive. People were on the lookout for Japanese submarines, and blackout lights were put in place in coastal cities. People were afraid of a Japanese attack. No one believed that the Japanese would invade the West Coast, but they did believe the Japanese could bomb the West Coast. Then you had similar situations up and down the East Coast, especially off of port cities. The German Navy attacked and sunk many U.S. Merchant and a few military ships off the coast of various places (Cape Cod, the Outer Banks, the Gulf of Mexico etc…) So naval and aireal attacks were feared by many civilians, especially in the waning days of 1941, and throughout 1942.
Then you had the first major U.S. Military Defeat in modern times (and arguably America’s worst military defeat all together) when the Japanese attacked the Philippines shortly after Pearl Harbor. The U.S. Military and locally raised Filipino units fought bitterly and bravely, but were eventually forced to surrender by early May 1942. This stunning military defeat for the U.S.A. (and equally for the British in Malaya and Singapore) to the Japanese (whom many in the U.S. viewed as racially inferior) was a complete and utter shock. Many just could not believe that the U.S. lost control over that area. Of course, many in the public still had faith in the U.S. Military, and still held faith in General Douglas MacArthur (who was urged by President Roosevelt to escape the Philippines to Australia) – even though many within the military ranks felt he had abandoned his men, and he earned the mocking moniker “Dugout Doug”.
This of course lead to the paranoia of the U.S. Government who interned Japanese and Japanese Americans. As well as recently migrated Germans and Italians. The U.S. did not fear a full on invasion, or loss of the war, but they rightfully feared that the Axis powers were spying on them (and of course they felt the same about the Soviets, who had pro-Communist Americans infiltrated in many government organizations). There were incidents where spies were found out, like the ones who were landed by U-Boat off Long Island, and were quickly captured.
But besides the loss of the Philippines, and then latter in the war being pushed back by the Germans in the Battle of the Bulge, the U.S. never had any spectacular losses in World War II. And certainly nothing remotely close to an invasion of the mainland U.S.A., except if you consider the Japanese invading the Aleutian Islands off the coast of Alaska. public never feared of an imminent invasion – but they did fear bombing raids, or submarines sinking shipping, and spies. Then again the American public was also fed a lot of propaganda, in the form of radio news broadcasts, films, and commercials in theaters showing how well the U.S. forces were doing. It was commonly remarked by foreign troops, like the British, that the American G.I. was overly self-confident and assured of final victory – and a lot of that had to do with perception of the war.