Middlesbrough cancelled out Ayew's opener through Marcus Tavernier, but they could not stop Ayew who was the game's outstanding performer.
Middlesbrough dominated possession in the opening 10 minutes and Jonny Howson failed to hit the target with the game's first chance.
Swansea had started sluggishly, but they woke up thanks almost solely to Ayew. The Ghanaian fired wide and then worked Aynsley Pears.
On the second of those occasions the ball bounced back to Ayew and he went down under the challenge of Middlesbrough defender Dael Fry.
Referee Dean Whitestone pointed to the spot and Ayew rose from the turf to slot home from the spot for his eighth goal of the season.
Surridge and George Byers then forced Pears into action in quick succession.
After their early promise Middlesbrough offered little as head coach Woodgate – who had fumed at the penalty being awarded – looked frustrated on the touchline.
In the minute of first-half added time the ball fell kindly to Middlesbrough's George Saville in the six-yard box, but he swung wildly at the ball and did not connect.
No foul was given and Swansea's Yan Dhanda then followed Browne into the book for the same offence as he too went to ground appealing for a penalty, this time at the other end.
Middlesbrough levelled in the 59th minute with a breakaway equaliser.
Woodman could perhaps have done better, but it was still a sloppy leveller for Swansea to concede as Surridge fired wide at the other end soon after.
Browne's horror appearance then went from bad to worse as he went in over the top of the ball and wiped out Van der Hoorn to be sent off. He was handed a straight red despite already being booked.
Browne had spent just 12 minutes on the field and Swansea swapped Danda for Barrie McKay in search of a winner as they now had a numerical advantage.
It soon worked with Ayew again the magician. He found space down the right, cut inside after being found by McKay, and powered the ball home with his left foot before celebrating wildly.
Surridge then wrapped up the win when Jake Bidwell's header down fell to the on loan Bournemouth striker who made it two home goals in as many minute.
McNair then felled Grimes on the touchline and received a straight red as the rain poured down late on to complete a day to forget for Middlesbrough.