The visitors led through a Liam Gordon header, but Sam Cosgrove's penalty and a second-half strike from Ash Taylor turned the game around for the Dons, with Saints substitute Callum Hendry sent off in the 90th minute.
With a ferocious wind enveloping Pittodrie, it was the away side who seemed to adapt to the conditions despite the loss of full-back Scott Tanser to injury after just five minutes.
Callum Davidson's side certainly looked the more likely to score, even if they were largely restricted to speculative efforts from the edge of the box, though David Wotherspoon's 14th-minute shot worried Joe Lewis but ended up wide of the post.
When the goal eventually came, it was a set-piece that led to it. Craig sent a free-kick from the left to the back post where Gordon rose unchallenged to head goalward. It was almost slow motion as his header struck the ground and looped over Lewis.
Aberdeen had offered little in the final third, and it took until the 45th minute before Cosgrove forced a save from Zander Clark, who got down smartly to his left to turn a 20-yard strike past the post.
From the resultant corner, the Dons had a strong penalty claim turned down as Andrew Considine's shot was handled by Booth, but when Cosgrove went down under the challenge of Jamie McCart as the ball came back in, referee Alan Muir this time pointed to the spot.
Cosgrove claimed the ball from regular penalty-taker Lewis Ferguson, and coolly slotted into the bottom-left corner to level the scores.
That acted as a shot in the arm for the home side, who were much improved after the break, and went in front after 54 minutes.
Matty Kennedy's corner from the right hit a St Johnstone body and dropped at the feet of Taylor who stroked home from 10 yards.
From then on it was a battle of wills but Aberdeen are in the habit of holding onto a narrow lead and, aided by Hendry's late dismissal for two bookings, they did enough to take the points.