Goals from Cillian Sheridan, Chris Millar and Liam Craig gave Derek McInnes’ side a healthy lead although Sasa Papac pulled one back to make it 2-1.
In the second-half Rangers huffed and puffed but overall they can have no complaints at the scoreline.
St. Johnstone were the better side throughout and at the final whistle their fans were understandably in shock having watched their team bag four against a defence with the best record in the SPL.
Smith named an unchanged starting eleven for this trip to Perth.
Steven Naismith retained his spot on the left of midfield behind Kenny Miller who grabbed his eighteenth of the season on Saturday against Hearts.
Kris Boyd, meanwhile, was seeking his first goal from open play in nine games but it was to be a frustrating night for the striker who was taken off at half-time.
Boyd continues to search for his 100th SPL goal in a Rangers shirt but has failed to find the net in the last five league outings.
Danny Wilson, another of Saturday’s scorers, partnered Davie Weir who became the oldest player ever to appear for the Light Blues tonight.
The Gers’ captain is just 41 days short of his 40th birthday, and made his 43rd start of the campaign, a tally that sees him sit joint top of Gers’ appearances table with Steven Davis.
Derek McInnes’ men started this match positively and despite the bobbly surface passed the ball about confidently in the opening stages.
And on six minutes they took the lead with a goal of the season contender.
Danny Grainger sent a raking pass down the left wing and Sheridan beat Danny Wilson to the ball before swerving a left foot shot across Allan McGregor.
The ball hit the back post, then the near post before rolling in to the net and McDiarmid Park erupted.
If that was good the Saints then doubled their advantage on 11 minutes and on this occasion the goal was down to a slice of luck rather than skill.
Chris Millar was given time and space 30 yards from McGregor’s goal and when he unleashed an ambitious shot the ball clipped Davie Weir’s shoulder and totally wrong footed the Gers keeper who had moved to his right.
After a sluggish start Rangers now had no option but to come out of their shell and attack and just five minutes later they had pulled a goal back.
Steven Davis danced passed two played before feeding a clever pass to Papac who had come in from the left to get in to the 18-yard box.
The Bosnian looked up as if he was going to cut the ball back across goal but instead he drilled a left foot shot past his former Ibrox teammate Graeme Smith at his near post.
Papac, of course, now has two goals for the season and both have come at McDiarmid Park.
After getting back in to the game the Light Blues kept the pressure on and on 20 minutes McCulloch blasted a shot over from 20 yards after Michael Duberry had sclaffed a Naismith cross in to his path.
Davis then produced a great chip over the Saints backline but Naisy could not get enough purchase on the ball to take it past Smith who had darted off is line.
Despite the arctic conditions this was proving to be a very entertaining encounter with Saints, and Sheridan in particular, proving a handful.
Before the half hour mark Thomson was robbed of the ball on the half way line and Filipe Morais sent the former Celtic man clear down the left but his shot, under pressure from Davis, hit the side netting.
On 34 minutes this game again took a stunning twist when Rangers went 3-1 down.
Millar crossed from the right and Liam Craig’s header took a slight deflection off Lee McCulloch before beating McGregor.
The Saints were now flying and their confidence was highlighted when Craig tried his luck with two shots from 35 yards with the first going narrowly wide and the second going straight at the Gers’ no. 1.
The biggest concern for Walter Smith at this stage would have been the amount of space given to the Saints midfielders and it was not a surprise that Mo Edu, and Kyle Lafferty, were told to warm-up after the third goal went in.
Both players were given the nod for the restart with Thomson and Boyd making way.
As a result Naismith moved in to the centre of midfield alongside McCulloch with Edu being used on the left flank. Lafferty joined Miller in attack.
But even with these changes Rangers failed to create a clear cut chance until the 74th minute when a raking cross was nodded down by Lafferty.
Edu was the recipient but his low shot had the power but lacked the accuracy to beat Smith.
Nacho Novo was introduced to the game in place of Wilson but it was the Saints that netted their fourth goal with just 11 minutes left.
A free-kick was delivered in to the box and when Duberry headed the ball back across goal Murray Davidson was there to roll the ball in to the net from close range.
It was all too easy for the home side and this was indicative of the entire game.
Two of the Saints four goals may have been fortuitous but overall they thoroughly deserved this win and for Rangers it underlined the fact that there is a lot of hard work still ahead in this title run-in.