How does the Fighter compare with the Paladin, Ranger, and Barbarian for damage-dealing and general combat? I'm looking at 3rd and 11th levels in particular.
Ignoring subclasses, level 3 Damages
Fighter:
TWF = 6 DPR Base / +1.8 Fighting Style / ~+0.9 Vex / ~+0.5 Action Surge = ~9.2 DPR
Greatsword = 6 DPR Base / +0.6 Fighting Style / +1.2 Graze / ~+1 Action Surge = ~8.8 DPR
Ranger
TWF = 6 DPR Base / +1.8 Fighting Style / +4.2 Hunter's Mark / ~+1.4 Vex = ~13.4 DPR
Barbarian
Greatsword = 6 DPR Base / +1.2 Rage / ~+2.9 Reckless / ~+0.5 Graze = ~10.6 DPR
TWF = 6 DPR Base / +2.4 Rage / ~+3.4 Reckless = ~11.8 DPR
Paladin (calculating using smite over a 16 round day).
Greatsword = TWF = 6 DPR Base / +0.6 Fighting Style / +1.2 Graze / +2.3 Divine Smite = ~10.1 DPR
TWF = 6 DPR Base / +1.8 Fighting Style / ~+0.94 Vex = ~8.7 DPR
All of these classes have subclasses that can significantly increase DPR as well.
Do you still have to use Action Surge to make up the damage difference?
Early yes. Later I think fighter can gain some ground without action surge.
How are weapon masteries affecting combat?
Weapon masteries tend to add a decent amount of DPR, though usually it's by increased accuracy or damage on a miss, so as you get items or effects that give you increased accuracy or advantage they do less and less for DPR.
IMO. Fighter starts looking more on par when they can gain their additional feat at level 6 and GWM at level 4.
In terms of durability I'd say Fighter and Barbarian are clearly the best in different ways.
Paladin and Ranger both lack a bit but provide some team friendly heal options Goodberry/Cure Wounds/Lay on Hands