Although Dec. 7, 1941 is marked as the entry of the U.S. into WWII, the fact is that the U.S. Navy was already in an undeclared shooting war with Nazi Germany at sea well before that. President Roosevelt and other senior U.S. and political leadership were convinced that England could not be allowed to fall. U.S. Navy leaders were particularly concerned about the possibility that the Royal Navy could fall into Nazi hands (as did most of the French Navy, before the British unilaterally sank most of it) which would dramatically increase the naval threat to the United States. As a result the U.S. pressed the envelope on "neutrality" and in many cases technically exceeded it, and multiple such "violations" were cited in Germany's declaration of war against the U.S. after Pearl Harbor.
In agreement with the British, U.S. Navy assets were escorting trans-Atlantic convoys across "our side" of the Atlantic as far as Iceland before handing them off to British escorts, frustrating German U-boats, who were under orders not to attack U.S. warships, although identification could be challenging (especially after we "loaned" the British 50 WWI-vintage four-piper destroyers).
On April 10, 1941, destroyer USS Niblack (DD 424) dropped depth charges on a German U-boat without result, but arguably the first U.S. "shot" of WWII. On Sept. 4, 1941, USS Greer (DD 145) was prosecuting U-652 and providing information to a British patrol bomber, which dropped depth charges on the submarine. U-652 retaliated by firing a torpedo at Greer, which missed, and Greer responded with an unsuccessful depth charge attack.
At the time, U.S. Navy rules of engagement (ROE) allowed passing tactical data to the British, but otherwise limited U.S. forces to self-defense. The Greer incident resulted in new ROE approved by President Roosevelt, which became known as the "shoot-on-sight" order allowing U.S. ships to attack any U-boat detected. On Oct. 17, destroyer USS Kearney (DD 432) responded to a wolf-pack attack that had overpowered the Canadian escorts of a convoy. Kearney conducted several depth charge attacks on German U-boats before being hit and damaged by a torpedo fired by U-568, killing 11 U.S. Sailors and wounding 22 more.
As the conflict continued to escalate, during daylight on Oct. 31, destroyer USS Reuben James (DD 245) positioned herself between an ammunition ship and a German wolf-pack, and was hit by a torpedo from U-552 intended for a merchant ship (so said the Germans). The torpedo detonated the forward magazine, blowing the bow off the ship, and causing the Reuben James to sink within five minutes. Only 44 her crew of 136 Sailors survived.
At the time of the attack on Pearl Harbor, the U.S. political and military leadership viewed the Atlantic Theater as paramount, and numerous naval assets, including aircraft carriers and battleships were diverted from the Pacific Fleet. In particular, the priority basing of long-range patrol aircraft to the Atlantic was a critical factor in the acute shortage of such aircraft (and trained crews and parts) at Pearl Harbor which contributed significantly to the Japanese surprise.