Thistle deservedly took the lead in the 25th minute when Kris Doolan headed home from a tight angle after some great technique from Kallum Higginbotham out wide.
But the creator allowed St Mirren back in the game on the stroke of half-time when he barged Jason Naismith in the back as he tried to get back goal-side, and Kenny McLean converted from the penalty spot.
Thistle had played some flowing football up to that point but the second half started scrappily. However, both sides then threw everything at getting a winner in a thrilling final quarter and both McLean and Thistle substitute Lyle Taylor hit the frame of the goal.
Saints and Thistle edged four and three points ahead of the dreaded second-bottom spot respectively but Ross County will drag them right back into the battle to avoid the play-off if they beat Kilmarnock on Saturday.
Both sides have got themselves out of 11th place in recent weeks and they named unchanged sides following wins last weekend, with St Mirren captain Jim Goodwin starting after challenging his red card against Hibernian.
Saints came close inside 90 seconds when John McGinn burst on to McLean's flick, but Paul Gallacher got down to save as he stabbed a shot under pressure.
Thistle quickly settled their nerves and got on top. Doolan looked lively leading the line with good support from Chris Erskine and Higginbotham.
Higginbotham followed some brilliant trickery on the left by a cross that was just too far in front of James Craigen, who could only glance the header wide.
But Thistle scored from the same source seconds later. Higginbotham swapped feet as he curled the ball beyond the far post with the outside of his right boot and Doolan rose to loop a header over Chris Dilo and just inside the opposite post.
The hosts remained on top without creating any more chances but Saints, who had 2,174 fans in the 5,971 crowd, came back into the game in the final five minutes of the first half with McLean to the fore.
Some left-wing deliveries from the midfielder were sent just off target by his former team-mate Lee Mair and then Goodwin, and a third cross led to the penalty as Higgoinbotham barged Naismith over as he tried to get back to cover.
Calum Murray immediately pointed to the spot despite protests and McLean fired low into the corner just out of reach of Gallacher's right hand.
Jags midfielder Prince Buaben made way for Gary Fraser at half-time after conceding possession several times in dangerous areas but play was more disjointed immediately after the restart and Saints forced a couple of opportunities - McGinn failing to connect properly with an overhead kick and McLean curling just wide from a 30-yard free-kick.
Josh Magennis replaced Paul McGowan as Saints went more direct but the home side then came close twice from Higginbotham deliveries - Mair sending a diving header wide from a wonderful free-kick before substitute Christie Elliott flicked a cutback across the face of goal.
Saints hit them on the break in the 74th minute though and McLean drove a low cross from Magennis against the post with the outside of his boot from 16 yards.
Both sides continued to attack. Visiting left-back Sean Kelly fired a deflected effort just wide and Dilo saved from Taylor's header.
The former Falkirk striker came closer in the 82nd minute when he looped a header against the bar from Jordan McMillan's cross as a static Buddies defence looked on in relief and the visitors survived some further pressure.