Gayle scored twice in the first half as the Baggies had the game sewn up by the break, with Harvey Barnes also finding the net.
The former Newcastle striker completed his first Albion hat-trick after the break as Darren Moore's side posted a fourth away win on the spin, which keeps them hot on the heels of Leeds and Norwich in the automatic promotion places.
For the Millers, their nine-game unbeaten run at the AESSEAL New York Stadium was ended in miserable fashion and just one win in 16 games leaves them looking over their shoulder, with Ryan Manning missing a late penalty.
The Baggies enjoyed the perfect start as they went ahead in just the sixth minute.
Clark Robertson was adjudged to have fouled Gayle 20 yards out and the striker stepped up to send the resulting free-kick under the wall and into the bottom corner for his 11th goal of the season.
Rotherham produced a spirited response and came close to equalising four minutes later when a corner was cleared to Manning and he cut inside and sent a thundering effort into the post, with Semi Ajayi's shot from the rebound then cleared off the line by Craig Dawson.
Not getting themselves level proved costly as West Brom doubled the lead in the 20th minute with consummate ease.
Barnes ghosted through a gaping hole in the home defence, slipped in Jay Rodriguez, whose shot hit the post, but Leicester loanee Barnes did what Ajayi could not and fire home the rebound.
Albion made it an opening 45 minutes to remember on the stroke of half-time as they extended their lead further.
Matt Phillips whipped in a free-kick from the left and Gayle got in front of his marker and poked home.
Gayle completed his treble nine minutes after the restart, but he had Millers goalkeeper Marek Rodak to thank for a terrible gaffe.
Trying to prevent a corner, Rodak scrambled to his left but inexcusably dropped the ball, allowing Gayle to snatch an early Christmas present by tapping into an empty net.
The Millers tried to restore some pride and Michael Smith forced keeper Sam Johnstone into a brilliant save to keep out a header and then Robertson saw another effort cleared off the line.
They had no better chance than the 76th-minute penalty, awarded after a foul by Tosin Adarabioyo on Richie Towell, but Manning hit the post and West Brom cleared.
Barnes and Hal Robson-Kanu went close to making it a record defeat at the New York Stadium for Rotherham, but they had to settle for four.
It was the heaviest home defeat of Millers boss Paul Warne’s reign, though he was left scratching his head at the severity of it.
Warne said: “They are a very good side. They way we set up I thought is the best way to set up, the players’ performances are as good as we could have asked for.
“The crucial moments in the game they took their chances and we didn’t take ours.
“I don’t think we could have played any better, we missed a penalty which summed up the day really.
“We were just on the side of unlucky, I don’t think we deserved to lose 4-0 today but West Brom were the better team.
“We have lost 4-0 but I am not disappointed because the lads played as well as they possibly could.
“Another day we might have got the equalising goal when we hit the post. It wasn’t like 4-0 and we took an absolute trouncing, we were always in the game.
“I don’t feel shamed at losing at home to West Brom.”