The visitors took the lead three times in the first half thanks to tries from Justin Horo, Luke Walsh and Tony Gigot.
However, scores from Theo Fages, Alex Walmsley and Louie McCarthy-Scarbrook gave Saints the lead at the interval.
Horo's second try put the Dragons back in front but tries from Jonny Lomax, Mark Percival, Luke Thompson and Ryan Morgan guided the hosts to victory.
Luke Walsh's goal after Richie Myler's try moved the French side to back within two points before the Saints crossed three times in the final 10 minutes.
A third win in four matches moves Justin Holbrook's men to within three points of fourth-placed Wakefield.
Catalans, who had already been consigned to the Qualifiers, have now lost five of their last six games.
St Helens coach Justin Holbrook:
"It was a danger game for us especially after our win (against Hull FC) last week. We had to earn the two points and they pushed us.
"They started well and we were not up to our high standards in the first half.
"We have to give them credit. I'm really happy with the way we finished the game off.
"We swapped the lead a few times and the boys did well to close it out.
"We have got some wins together and it's a big game next Sunday (against Wakefield) and if we can continue to improve then I would certainly back ourselves (in the play-offs)."
Catalans Dragons coach Steve McNamara:
"It was disappointing to lose the way we did. With eight-and-a-half minutes left we were two points down on the scoreboard.
"It was a real tit-for-tat game. We found ourselves in a position to win it and we have conceded a lot of points at the end which makes the scoreline look ridiculous.
"We are going in the right direction and we know where we are for the rest of the season."
St Helens: Lomax, Makinson, Morgan, Percival, Grace, Fages, Richardson, Douglas, Roby, Thompson, Taia, Peyroux, Wilkin.
Replacements: Walmsley, McCarthy-Scarsbrook, Lee, Knowles.
Catalans Dragons: Gigot, Tierney, Inu, Duport, Yaha, Walsh, Myler, Moa, Aiton, Bousquet, Anderson, Horo, Baitieri.
Replacements: Casty, Bird, Da Costa, Navarrete.
Referee: Ben Thaler (RFL)
St Helens boosted their hopes of a top-four finish with a battling Super League win over Catalans.