Facing overwhelmingly odds, what do they do? They order an entire army of dothraki to charge the dead beyond supporting cover fire. Then they order the rest of their forces to face the dead in open combat. Why not use your defensive fortifications fellas? Like the big goddam castle you all gathered at?
Here's some basics for the noobz.
One Dragon on the walls.
One Dragon flying after the Knight king with focus being protecting the God's wood. Can't be there too early.
Love Theon and his pluck, but gimme Jorah or somebody like that guarding Bran
(Melisandre really has to show up earlier quite frankly and actually participate in the plan - but even so, clue in Arya in up front that she's gotta get it done)
Arya hides in God's Wood tree like a proper assassin would.
If you have the time, 6 or so similar trenches surrounding. the battle field. Allow the undead army to get most of the way across (it will be spread out). Use the dragon to light up all six trenches. So now the undead army is broken into 'slices'. Each slice can be dealt with. Dragon cleans up the farthest slices. Trebuchet's fire into the medium range slices. Fire burning arrows into the nearest slices. The Dothraki with their flaming swords are stationed around the back/sides of Winterfell. Once this is all going down, they ride around the back and pick off the undead horde from behind, including attacking the White Walkers.
Once they finally break through to the fortress, you have the walls slathered with pitch. Dragon lights the outside walls on fire while the undead are climbing up. Entire top of the castle lined with Dragon glass. More fire on the ramparts maybe.
And so on and so forth. You are gonna take heavy losses, but you sure as snow are gonna give yourself more time.