Jonathan Woodgate's visitors remain in trouble and their cause was not helped by losing Marcus Browne and Paddy McNair to straight red cards.
Middlesbrough cancelled out Ayew's opener through Marcus Tavernier, but they could not stop Ayew, who was the game's outstanding performer, claiming a second.
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.
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 first-half added time the ball fell kindly to Middlesbrough's George Saville in the six-yard box, but he swung wildly at it wildly and failed to connect.
Middlesbrough swapped Adam Clayton for Browne early in the second half and the substitute was almost immediately booked for diving as he fell close to Matt Grimes.
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.
Striker Ashley Fletcher led the charge with Mike van der Hoorn struggling and he found Tavernier who fired left footed past Freddie Woodman in the Swansea goal.
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 and was 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 minutes.
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.