Cardiff Blues were forced to play for over half the game a man down after a red card to lock Jarrad Hoeata for a dangerous high tackle on visiting captain Rob Kearney while leading 13-5.
And a yellow card to first half try scorer Manoa Vosawai meant a spell with only 13 men for the home side.
Leinster eventually left the Welsh capital with a try bonus point, with Tadgh Furlong scoring with three minutes remaining.
But up until that point it was Mark Hammett’s men who continued to play an attacking brand of rugby and produced a massive defensive display to hold Leinster at bay for long spells despite the numerical disadvantage.
Director of Rugby Hammett later admitted he had no complaints with the decision over Hoeata but paid tribute to the fight and spirit of those that remained on the pitch.
And that effort was recognised by the home faithful at the final whistle as Blues came up short of what would have been a deserved losing point after an afternoon of high drama.
The game started with a bang as Leinster went ahead after 64 seconds to leave Blues shell-shocked.
A sublime break by Jimmy Gopperth tore open the Blues defence and fed Noel Reid on the reverse for the young centre to race over, despite the desperate attempts of Cory Allen.
Stunned Blues looked to respond with Lou Reed and Kristian Dacey rattling into contact and milestone man Gethin Jenkins, on his 150th appearance, offering himself up as a willing runner time and time again before a spilled ball saw growing forward momentum stopped.
A sniping run around the fringes by visiting scrum half Luke McGrath caused alarm for Blues before Gopperth danced out of tackles as missed tackles from the home side proved costly in the opening exchanges.
A blooded Sam Warburton was replaced by Manoa Vosawai on 13 minutes, after a heavy tackle with Ben Te’o left him with a nasty cut around the eye, as Blues wore the scars of a physical opening quarter.
A high tackle on Dacey by Kane Douglas then gave Anscombe a first sight of the posts from 45-metres out and the fly half made no mistake to cut the lead back to two points after 18 minutes.
Blues showed resolute defence to hold Leinster in midfield as they searched for any weaknesses in the home rearguard and when the penalty was won, for not releasing, Anscombe lined up a kick from halfway and duly drilled it over.
A barnstorming run from replacement Vosawai then released Turnbull into space to a huge home roar.
Anscombe looked to exploit a gap, Dacey and Reed bumped men off but Allen spilled the ball forward as Blues menacingly rumbled up to the line.
Vosawai was in the thick of the action as the big Number Eight pinched ball at the breakdown before a penalty, for not releasing, saw Blues go to the corner and back their set piece.
A driving lineout barged up close before a number of pick and goes saw Vosawai touch down and immediately claim the score. After consulting with the TMO the try was awarded to a delighted home crowd.
A penalty for not rolling away from the tackle gave Gopperth the immediate chance to cut the lead. However, the fly half, bound for London Wasps next season, saw his effort fly left of target.
Blues were then dealt a shuddering blow on 33 minutes as a high tackle from Hoeata on visiting skipper Rob Kearney saw him red carded.
Leinster upped the pace of the game and kept ball alive to try and exploit numbers, but were given a let-off with Rob Kearney enjoyed a big slice of luck when he dallied collecting a clearing kick from Anscombe and Cuthbert was close to streaking away.
More solid defensive work saw Jenkins secure a penalty in the final minute of the half and Anscombe line up a monster kick from inside his own half. The effort pulled up short but Rob Kearney kicked off to signal half-time.
A slicing break from Joaquin Tuculet at the start of the second half put men on his shoulder into space and twice neat handling from Lucas Amorosino kept the play alive in a breathless start to the second 40 minutes as Blues threatened once more.
The home side were keeping the ball tight to deny Leinster any ball before Navidi broke down the middle and when the ball was spun wide it was the home fans who were incensed that Rob Kearney was not yellow carded for a deliberate knock on as he shot out of the line.
It got worse seconds later when Blues were reduced to 13 men when Vosawai was instead yellow carded, after the referee consulted the TMO, for using his knee as he went into the ruck.
Leinster immediately looked to capitalise as Sean Cronin broke down the middle and only a knock on in the build-up denied the Irish province a certain score wide left.
Tension was growing as Blues had to defend for long periods without the ball and time and time put tackles in to repel the growing force of the champions with every home decision greeted with wild cheers.
A huge tackle from Allen on Reid stopped a try in the far corner but pressure finally told as Gopperth broke past tackles to score and picked himself up to slot the conversion as Blues led 13-12 with over 20 minutes left as Vosawai returned.
Suddenly Leinster looked dangerous with every attack and when scrum half McGrath broke down field and evaded two tackles the ball was finally spun wide at pace and McGrath again popped up and stretched over to score.
Blues continued to drive for an opening with Amorosino’s slick offload to Anscombe sending him into clear air after Navidi’s typically robust burst over halfway.
More strong play from the home forwards secured a penalty and Anscombe kicked to the corner in the hunt for the maximum prize. Another penalty was then greeted with cries of derision from the home support as no yellow card followed.
A brilliant run from Cuthbert blasted past one man and he so nearly fed Anscombe in support.
Leinster wrapped up the bonus in the closing minutes a burst down the left wing from Kearney broke the defence open and when it was fed infield the ball found Furlong who bashed over.
One last burst from Blues saw Allen scamper down the right wing and be forced out and the Wales centre then found gap in midfield as the home side pushed to no avail in the dying seconds.
Timeline:
02m Reid t 0-5
18m Anscombe p 3-5
22m Anscombe p 6-5
28m Vosawai t Anscombe c 13-5
56m Gopperth t Gopperth c 13-12
63m McGrath t 13-17
76m Furlong t 13-22
Cardiff Blues: 15 Joaquin Tuculet, 14 Alex Cuthbert, 13 Cory Allen, 12 Gavin Evans (Thomas 52), 11 Lucas Amorosino, 10 Gareth Anscombe, 9 Tavis Knoyle (Williams 63), 1 Gethin Jenkins, 2 Kristian Dacey (Rees 33, Filise 44-53), 3 Adam Jones (Filise 63), 4 Lou Reed, 5 Jarrad Hoeata, 6 Josh Turnbull (Normandale 78), 7 Sam Warburton (Vosawai 13), 8 Josh Navidi
Replacements: 16 Matthew Rees, 17 Sam Hobbs, 18 Taufa’ao Filise, 19 Miles Normandale, 20 Manoa Vosawai, 21 Lloyd Williams, 22 Gareth Davies, 23 Adam Thomas