Boro was rampant, but they were not clinical, Martin Braithwaite missed a great opportunity just before the break, while he was running on a perfect knockdown of Flint in the area, but hit the bar from the six-yard box. It was a terrible miss and as bad as West Brom had been, they would have been consoled that their hosts had not let them pay.
Revenge remained on the agenda for Pulis, but there will have been a nagging sense of disaster that, after he had played so well, his former party in the second period would not be as poor as in the first.
They were, however, and Ryan Shotton should have done better with a header on the second post after a muscular run by Britt Assombalonga along the left flank.
Then, out of nowhere, Albion had their first real chance, Matt Phillips broke with Dwight Gayle from a corner, only for the last to fail to hit the target under pressure from the last defender Adam Clayton.
Moore's men remained too passive, although Darren Randolph did an acrobatic rescue to exclude Jay Rodriguez's long-range attack.
Then, deep in the injury time, Ayala hit Middlesbrough's winner, checked a ball in the box – arguably with the use of an arm – and stuck in the far corner to enrapture the Riverside and an elated Pulis.