The hosts, chasing a fifth European crown but without influential fly-half Jonathan Sexton because of injury, were made to work hard for their narrow win at Aviva Stadium, with Ulster producing a determined display.
Ultimately, tries from Ross Byrne, who was playing as number 10 in Sexton's absence, and Adam Byrne got the job done, but only after Jacob Stockdale had fumbled when he looked certain to score what could have been a pivotal try.
It was Dan McFarland's men who led early on, with Kieran Treadwell crossing, but Ross Byrne's score cut the gap.
John Cooney and Ross Byrne exchanged two penalties apiece to take Ulster into the break with a 13-11 lead.
Stockdale's moment to forget came early in the second half as he failed to ground the ball, losing control as he attempted to place it down with one hand.
Adam Byrne made him pay for that miss after collecting Jack Conan's pass to go over, but Ulster was not done and Luke Marshall levelled it up 16 minutes from time.
Cooney missed a presentable conversion opportunity and that left it to the boot of Ross Byrne, who shrugged off an apparent injury to send a late penalty sailing between the posts.
Leinster will now face a semi-final with Racing 92 or Toulouse, who meet on Monday (AEDT).