Tries from Dan Leavy and Luke McGrath - either side of a brilliant breakaway by the Blues' Tomos Williams - put the hosts 14-7 ahead at half-time.
The visitors fought back to lead 21-17 after counter-attacking scores from Williams and Sion Bennett.
But Ross Molony plunged over from close to give Leinster a seventh successive league win.
Leo Cullen's men are now six points clear at the Pro12 summit, with second-placed Ospreys away against Treviso later on Saturday.
Defeat for the Blues, meanwhile, sees them stay in eighth place.
Media playback is not supported on this device
Glorious sunshine and a pristine pitch made for perfect conditions at the RDS, encouraging both teams to play adventurous, running rugby.
Leinster led after just four minutes as flanker Leavy collected a neat grubber kick from centre Noel Reid to touch down in the corner.
Their lead did not last long as the visitors counter-attacked at pace, with captain Blaine Scully and Rey Lee-Lo offloading sharply before Williams cantered over.
The Blues were threatening whenever their backs got their hands on the ball but their pack struggled against the ballast of Leinster's forwards, whose powerful carries paved the way for scrum-half McGrath to dive through a crowd of bodies and touch down.
The visitors fought back in spectacular fashion, with Williams finishing after a fine run from hooker Kristian Dacey, before replacement back-rower Bennett showed a similarly impressive turn of pace to run in from 40 yards and put the Blues 21-17 ahead.
It was the Leinster pack, however, who had the final say, with lock Molony emerging at the bottom of a pile of bodies to score the decisive try.
Leinster: J Carbery; A Byrne, R O'Loughlin, N Reid, I Nacewa; R Byrne, L McGrath; C Healy, R Strauss, M Bent; R Molony, H Triggs; D Leavy, J van der Flier, R Ruddock.
Replacements: J Tracy, P Dooley, M Ross, M Kearney, M Deegan, J Gibson-Park, T Daly, F McFadden.
Cardiff Blues: Matthew Morgan; Alex Cuthbert, Rey Lee-Lo, Steven Shingler, Blaine Scully (capt); Gareth Anscombe, Tomos Williams; Corey Domachowski, Kristian Dacey, Anton Peikrishvili, George Earle, Jarrad Hoeata, Macauley Cook, Josh Navidi, Nick Williams.
Replacements: Matthew Rees, Gethin Jenkins, Scott Andrews, Sion Bennett, Ellis Jenkins, Lloyd Williams, Willis Halaholo, Tom James.
Referee: George Clancy (Ireland)
Assistant referees: Matteo Liperini (Italy), Richard Kerr Ireland).
Leinster resisted a spirited Cardiff Blues revival to strengthen their position at the top of the Pro12 table.