At no moment during the battle was it ever possible for Winterfell to turn the tide. They were fighting an absolutely fearless army numbering in the hundreds of thousands, immune to the cold and able to see in the dark, and commanded by a being who could instantly raise the dead to fight for him, even those dead hundreds of years. There was never a moment when it wasn't about who would kill the Night King, and how. The defenders knew that going in... which is why, admittedly, the Dothraki charge was stupid. It did nothing really to buy any time and it sacrificed many thousands of potential defenders who could have kept the battle going long enough to find a way.
The battle scenes were never "who's going to win?" but "can they stay alive long enough to get to the NK?"