Brian McClennan’s side were 18-8 down at the half-time interval, but edged out the Saints after a final quarter in which the lead changed hands three times.
The Rhinos will face either holders Warrington Wolves or Les Catalans Dragons who meet at the Stobart Stadium tomorrow.
Instead it fell to Kevin Sinfield to open the scoring with an eighth-minute penalty, and the lead was extended when Keith Senior’s well-worked pass allowed Brent Webb to send Ryan Hall over the line, Sinfield converting.
Mick Potter’s men saw another try ruled out by the video referee before two tries in the final ten minutes of the half gave them an interval lead.
First Kieron Cunningham dived over from dummy half in trademark fashion despite the attentions of Chris Clarkson and Rob Burrow, before Meli strolled over the line courtesy of an easy interception, Foster converting both.
Leeds hit back quickly after the restart, Webb and Senior combining once again for Hall to cross and Sinfield adding the extras, but Matt Gidley’s try left Saints holding a 22-14 lead.
The Rhinos were not deterred: Senior sent Danny McGuire over with an excellent pass before Danny Buderus did likewise for Webb with an even more impressive pass; Sinfield converted both, giving Leeds a 26-22 lead.
A frenetic final ten minutes saw Saints re-take their lead when Cunningham found James Graham, who used sheer strength to find a way over the line, Foster converting.
But Leeds edged themselves ahead decisively when Jamie Peacock’s superb pass allowed McGuire the space to sprint over the line, Sinfield adding his sixth goal from six attempts.
St Helens sought a way back into the lead, but the Rhinos’ defence held firm until the very end.
Leeds – 32
T: Hall (20, 42); McGuire (59, 74); Webb (63)
G: Sinfield (8, 20, 42, 59, 63, 74)
St Helens – 28
T: Wellens (24); Cunningham (34); Meli (39); Gidley (46); Graham (71)
G: Foster (24, 34, 39, 71)
Ref: Phil Bentham