Replacements: Ian Prendiville, Warren Larkin, Joe Moran, Scott Deasy, Tom Farrell.
Replacements: Scott Flanagan, Thomas O'Reilly, Gareth Austen, Chris Lilly, Robbie Glynn.
Two tries from Matthew D'Arcy and one from Ciaran Ruddock put the visitors 19-10 up at half-time, with Landsowne's points coming from Willie Walsh and Peter Dooley tries.
An early second half penalty from Tom Kiersey cut the deficit to four points, but St. Mary's winger Steve Toal-Lennon converted Robbie Hudson's try for the bonus point.
Marcus O'Driscoll got the visitors' fifth, before Lansdowne's Kiersey grabbed what he thought was the game's last score until Colm McMahon crossed in time added on.
Having outscored the hosts by six tries to three, St. Mary's 20-point winning margin was richly deserved and should all but secure their Division 1A status.
Despite suffering just two defeats in their previous seven league games, 2012 champions St. Mary's found themselves in relegation trouble.
They have been sucked into a fight for survival following Ballynahinch's two recent bonus point wins, which has brought them to within striking distance of the Templeogue club.
Reigning champions Lansdowne, meanwhile, had only won once in five matches before kick-off and lost out to a late try at UCD in their last outing.
However, in November's encounter between the Dublin sides at Templeville Road, Mike Ruddock's men prevailed 33-28 as the team scored four tries apiece.
The two bonus points from that fixture have helped to keep Smyth's charges above dangerous waters, but they knew anything other than a victory today could allow 'Hinch to leapfrog them.
This fixture was originally meant to take place last month, but due to bad weather the match was called off and rescheduled for this weekend on the Aviva Stadium's back pitch.
St. Mary's were without key players Darren Hudson and Cathal Marsh, who started for Leinster 'A' in their British & Irish Cup clash with Munster 'A' on Friday night.
And the Dublin 4 side looked to take advantage as they charged forward in the early stages, with Kiersey missing a sixth minute penalty.
But St. Mary's broke to score when Mark Fallon offloaded to send scrum half D'Arcy under the posts on 15 minutes. Gavin Dunne added the extras to put the visitors 7-0.
Less than two minutes later, Lansdowne replied with a try of their own when Mark Roche set up full-back Walsh to dart over on the right touchline.
Kiersey failed to level the scores after missing his second attempt at goal and the home side were made to pay straight from the restart.
St. Mary's centre O'Driscoll broke through the defensive line to pass for the supporting D'Arcy to cross again. Dunne's second conversion made the scoreline 14-5.
There was to be no letting up as St. Mary's relentless assault continued and they struck again on 26 minutes when Ruddock grounded the ball after a forwards' drive over the line.
Dunne missed his conversion and ten minutes later Lansdowne were back in contention when Ireland Under-20 prop Dooley bundled over from close range on the right.
A hapless Kiersey saw his conversion come back off the post and then minutes later he came up short with a penalty kick.
However, the Lansdowne out-half finally landed his first points with the boot at the fifth time of asking with a 45th minute penalty to make it 19-13.
But the visitors grabbed the bonus point on 67 minutes following a powerful surge from replacement Gareth Austen which ended with Hudson crossing. Toal-Lennon tagged on the conversion.
O'Driscoll extended the margin to 18 points when D'Arcy pounced on a loose ball out of a scrum to break away and set up the centre for St. Mary's fifth try in the 73rd minute.
Lansdowne poured forward in search of a consolation score and they got one with a minute to play when Kiersey collected a cross-field kick by replacement Scott Deasy.
Deep in injury-time though prop, McMahon drove over from close range and Toal-Lennon's conversion was the game's final action.
Referee: Will O'Connor (IRFU)