The USS Ward made sonar contact with what turned out to be a midget submarine and sank it, all shortly before the Japanese air attack began. As this occurred prior to the air attack, the other contenders could not have been the first.
Some have argued that the deliberate attack on the United States gunboat USS Panay in 1937 on a river in China by the Japanese in the Panay incident might qualify. However, World War II is generally considered to not have begun until Germany invaded Poland on September 1, 1939. On the other hand, Japan had been involved in military actions in China since 1931, when it first attacked Manchuria, later making a full scale attack upon China.
The first time Americans engaged in hostile action after September 1, 1939 was on April 10, 1941, when the destroyer USS Niblack attacked a German U-boat that had just sunk a Dutch freighter. The Niblack was picking up survivors of the freighter when it detected the U-boat preparing to attack. The Niblack attacked with depth charges and drove off the U-boat. There were no casualties onboard the Niblack or the U-boat.
One could argue that the sinking of the USS Reuben James by the German U-boat U-552 on October 31, 1941 might be considered the first American losses of World War II. However, America was not directly involved in the war yet, nor did this cause America to declare war. An interesting quirk of history, the Niblack was in the same convoy as the Reuben James when the Reuben James was sunk.
Bob Warnock, a Sailor on the deck of the submarine, USS Cachalot (SS-170), when the attack began. After witnessing a Japanese plane torpedo the nearby USS Pennsylvania (BB-38), he fired upon the plane with his sidearm.