Wales star Martyn Williams stepped off the bench to score the crucial try six minutes from time before Craig Morgan signed off his last home appearance for the region with an injury-time try that settled maters once and for all.
Those last tries also bagged a bonus point for the Blues - following scores by Nick MacLeod, Mike Phillips and Chris Czekaj - to lift the region above Munster and Edinburgh into third place in the Celtic League. Leinster also clinched a bonus point for their four tries but defeat looks to have ended their title chances with Ulster level on points but with a game in hand.
A league record crowd of 15,327 turned up at the MIllennium Stadium and were treated to a nine-try thriller. The Blues raced into an 11-point lead in as many minutes after young full-back MacLeod finished the fleet-footed Jamie Robinson's break only for Shane Horgan to profit from Phillips's charged down clearance.
Phillips made amends with a scorching 40-metre score but the Wales scrum-half could only look on in horror as the ball bounced over his shoulder into D'Arcy's hands and Contepomi's conversion brought Leinster to within an unlikely point.
The Blues again thought they had made the crucial breakthrough when Marc Stcherbina sent over wing Czekaj nine minutes after the break but Kearney picked a ball off the post to dive over after Contepomi's kick came to rest against the foot of the post. That put Leinster ahead for the first time in the 70th minute before the Blues rallied with two late tries.
Williams went over following a neat exchange between the Robinson brother and Morgan settled matters in the corner to huge cheers.
Blues: N MacLeod; C Czekaj, J Robinson, M Stcherbina, C Morgan; N Robinson, M Phillips (R Powell, 79); J Yapp, R Thomas, G Jenkins, D Jones (K Schubert, H-T), R Sidoli, M Molitika (M Williams, 67), X Rush (capt), R Sowden-Taylor (S Roberts, 55-65)
Tries - N MacLeod, M Phillips, C Czekaj, M Williams, C Morgan
Con - N Robinson (3)
Pens - N Robinson (3)
Leinster: G Dempsey; S Horgan, G D'Arcy, K Lewis (R Kearney, 64), D Hickie; F Contepomi (capt), G Easterby; R Corrigian, B Jackman (B Blaney, H-T), E Byrne (W Green, H-T), A Byrnes, M O'Kelly, E Miller (N Ronan, 15), J Heaslip, K Gleeson
Tries - S Horgan, G D'Arcy, D Hickie, R Kearney
Cons - F Contepomi (4)
Pens - F Contepomi
Referee: R Dickson (Scotland)