Using your bow from a distance is a great way to snipe these foes. Before charging into the battle between the bandits and necromancers, make sure to bring along health potions to quickly heal yourself while in battle.

You will know when you pass the four rocks since they each make a sound. Once you hear the fourth sound go off, you will know it is time to use your shout before the gates have time to close.