Celebrations for Kimpioka’s opener were delayed by a lengthy VAR check after the goal was initially ruled offside, with technology involved again to deny the striker on 19 minutes.
The Swede seemed to have drilled in a second but defender Kyle Cameron, who nodded the ball into Kimpioka’s path, was ruled offside.
St Mirren took control of proceedings after Tanser’s stunning equaliser. A powerful Fraser header was parried clear before Toyosi Olusanya blazed wide.
O’Hara’s deflected goal, which followed a flurry of St Mirren chances following the interval, earned the hosts a deserved lead.
Ayunga then netted for the first time since December last year after Mikael Mandron’s lobbed pass allowed him to bear down on goal and tidily finish past Sinclair to secure the home side’s win in stoppage-time.
The home victory sees St Mirren rise three places to seventh in the Premiership table, while St Johnstone drop to ninth.