Edinburgh’s late surge which yielded a bonus point in Dublin could yet prove priceless in the race for a European spot.
Alan Solomons’ men were chasing the game for long periods but they never gave up and were rewarded in the closing stages when they salvaged a point.
It was no more than they deserved with three tries to four for the home side in an entertaining encounter.
Edinburgh have only once before done the double over Leinster and that 2003-04 feat never really looked like being repeated at a windy and cold RDS in Dublin.
All seven tries came in an exciting second-half but by then Leinster had an edge and looked set to coast to victory when they led by 30-15 after 64 minutes.
The comeback started when Sean Kennedy raced through to score ten minutes from time and while Jason Tovey was unable to convert, Edinburgh kept pushing forward.
And they were rewarded two minutes from time when a high tackle by Leinster double try scorer Fergus McFadden on Damien Hoyland presented Sam Hildalgo-Clyne with an opportunity and he made no mistake into the teeth of the wind from the 22 to secure a losing bonus point.
Edinburgh also started with an early penalty when Tovey converted a penalty from 25 metres in front of the posts.
But Edinburgh had to spend long periods penned inside their own half as Leinster took control.
Tovey was penalised for not rolling away and Ian Madigan slotted an equaliser from in front of the posts after eight minutes as the leaders Leinster began to find momentum.
They edged in front with another simple penalty from Madigan after 12 minutes after a good break by Luke Fitzgerald led to an 11-phase move which stretched Edinburgh.
But Edinburgh also managed to string some possession rugby together but a promising move deep inside the home half came to nothing after 18 phases when Tovey was unable to take a poor pass from his scrum-half Hidalgo-Clyne after 16 minutes.
Italian referee Marius Mitrea lost patience with mounting penalty count from the visitors and Edinburgh flanker Jamie Ritchie paid the price with a yellow card six minutes from the break when conceding their eighth penalty.
Leinster went to the left corner with the penalty and seemed poised for the opening try of the game, but Edinburgh defended with discipline and forced the leaders to go wide but they turned over the ball with a loose pass to touch.
The reprieve was short-lived for Edinburgh as Leinster countered but the opportunity was again lost when hooker Richardt Strauss knocked on a few metres from the line.
That left it 6-3 at the break but Edinburgh, looking for successive away wins for the first time in over a year, had to face the strong wind after the restart.
Leinster struck a telling blow four minutes into the second-half when a break from Fitzgerald set up scrum-half Luke McGrath for a try under the posts, which Madigan converted for 13-3.
Edinburgh hit back and Tovey created an opening for Tom Brown with a looping pass which caught out Fergus McFadden and the winger finished in style. Tovey’s touchline conversion was on target but held up in the wind.
Edinburgh continued to press but disaster struck when Noel Reid intercepted Kennedy’s pass in midfield and he put Josh Van der Flier over for Leinster’s second try, which Madigan converted to make it 20-8 after 51 minutes.
Leinster went for the kill after that. Madigan went to the corner with a penalty close to the posts and while Edinburgh did well to initially repel them, the Irish went wide and McFadden got over in the right corner after 57 minutes.
Edinburgh pounced on a Madigan mistake to get back in the match when Mike Allan intercepted his pass to score under the posts, with Tovey’s conversion making it 25-15 after 61 minutes.
McFadden got his second of the night three minutes later and it seemed the leaders would pull away, but Edinburgh hung in there and were rewarded with their late surge which keeps them in contention.
Scores: Leinster: Tries: McFadden (2), McGrath, Van der Flier. Pens: Madigan 2. Cons: Madigan 2
Edinburgh: Tries: Brown, Allan, Kennedy. Pens: Tovey, Hidalgo-Clyne. Con: Tovey
Leinster: R Kearney; McFadden, Te’o, Reid, Fitzgerald (D Kearney 77); Madigan (Marsh 65), McGrath (Reddan 65); Healy (Dooley 52), Strauss (Cronin 52), Ross (Furlong 52); Molony (Toner 65), Kearney; Ruddock (Ryan 51), Van der Flier, Murphy
Edinburgh: Kinghorn; Hoyland, Dean (Allan 41), Burleigh (Kennedy 41), Brown; Tovey, Hidalgo-Clyne; Dickinson (Sutherland 65), Ford (McInally 54), Nel (Andress 65 ); Bresler (A Toolis 52), B Toolis; Ritchie, Hardie (Watson 58), Du Preez
Referee: M Mitrea (FIR)