Trailing by 12 heading into the closing stages at Murrayfield, the visitors scored 15 unanswered points to win 22-19 and reach their first final for seven years.
Ian Madigan, who had previously scored a clutch conversion, put a last-minute penalty through the posts after Michael Willemse was penalised for a deliberate knock-on.
That capped the fightback after tries from Rob Herring and John Andrew had hauled Ulster level.
Prior to the late drama, it appeared Ulster would fall at the last-four stage against Scottish opposition for the second straight season, having failed to get the better of Glasgow Warriors in last year's semi-finals.
Stuart McInally forced his way over to give Edinburgh a five-point half-time lead, before scores from Darcy Graham and Chris Dean extended their advantage despite an impressive try from Ulster wing Rob Lyttle.
But Edinburgh folded late in the contest and its wait to win the competition continues, having lost its only appearance in the final 11 years ago.
The dramatic match on Sunday (AEST) came after Leinster defeated Munster 13-3 on Saturday (AEST) to remain on course for a third consecutive title and seventh overall.