I've read several accounts of the battle and it truly was a David vs Goliath fight. Only the extreme heroism of the men on a small and outgunned fleet of ships saved the day. A proud chapter in U.S. Naval history.
Well, for
a couple hours at Samar that was the case... otherwise, the Imperial Navy was
vastly outgunned by the USN in every category. Overall, Leyte was
not a close-run battle. It pitted the world's largest and most modern carrier and surface fleet, with great logistical support, against what was left of the Japanese navy, which no longer had an air arm to speak of. For us to actually lose the battle at Leyte would have required a
really big screw-up, and for a while it looked like Halsey provided just that.
Even Samar wasn't
that close... all the Taffies had quite a few aircraft between them. The Japanese lost more in that battle than they killed, and much of the damage was done by aircraft, not the DDs/DEs of the Taffy screen. Just imagine how bad off the Japanese would have been if Sprague had a few light cruisers and some more destroyers...