Scrum half Greig Laidlaw and try scorers Fraser McKenzie and Netani Talei played key roles for the hosts, while try-scoring centre Ian Whitten and place-kickers Paddy Wallace and Ian Humphreys shared out Ulster's points.
For Brian McLaughlin's men, this defeat finished off a disappointing week in which they lost to French heavyweights Biarritz Olympique in Europe, and surrendered their five-match unbeaten run in the league.
Wallace, who slotted in at fly-half for the second time in recent weeks, missed a fourth minute penalty, striking the ball to the right and wide.
Blair was similarly off target with a drop goal attempt. However, an Ulster hand had touched the ball in flight, so Edinburgh were awarded a five-metre scrum after an unaware Adam D'Arcy had decided to touch the ball down behind the posts.
Rob Moffat's side used the platform of the set piece to maintain the pressure close to the Ulster try-line, and after some good ball retention from the forwards, Laidlaw sprung McKenzie for a burst on the blindside and the big lock powered his way over past David McIlwaine for a tenth minute try.
Ulster reduced the margin to 5-3 after D'Arcy had cut through on a darting 40-metre run. That garnered field position for the visitors and Wallace followed up with a successful penalty from the left.
The incessant rainfall did little for the quality of play, with the error count increasing for both sides. Wingers Tim Visser and Mark McCrea got some ball in hand, but defences were on top for the most part.
Paterson restored Edinburgh's five-point advantage with a 25th minute penalty, only for Ulster to find some rhythm in the lead-up to half-time.
Number 8 Robbie Diack attacked from the base of a scrum inside the 22, and as Ulster built through the phases, with Andrew Trimble making ground, they moved the ball out to the left where Dan Tuohy put the onrushing Whitten through for a well-worked 30th minute try.
Wallace converted to make it 10-8 and that is how it remained for half-time, with Edinburgh dogged in defence.
When play resumed, Ulster got back on the attack and a ruck infringement from Edinburgh hooker Andrew Kelly allowed Wallace kick his side into a 13-8 lead. The game seemed to be slipping from Edinburgh's grasp slightly, but the influential Talei gave them a timely and much-needed spark.
He scored a quick-fire try, starting and finishing a fine move. Talei made a great burst from a lineout near halfway, he was hauled down just short of the try-line, but after good control from Laidlaw and McKenzie, Tuohy could not stop the Fijian powerhouse from close range. Paterson converted to nudge Edinburgh back in front (15-13).
Some wayward kicking and indiscipline at the breakdown robbed both sides of momentum at crucial stages. Edinburgh were just that little bit cleverer, with Laidlaw and flanker Ross Rennie to the fore in some of their best plays.
Paterson kicked the first of two penalty efforts to make it 18-13 with just ten minutes to go.
Ulster were still very much in the hunt, especially after Edinburgh replacement prop Kyle Traynor was sin-binned for going offside at a ruck.
Humphreys, who came on at fly-half with Wallace moving to inside centre, did brilliantly to convert the resulting penalty from 45 metres out.
But just a minute later, replacement Alex Grove secured turnover ball for Edinburgh near the visitors' 22, and Blair conjured up the match-winning score with a neatly-taken drop goal.
At the tail end of a stop-start peformance, Ulster could not find a response despite Paterson handing them some late possession.
Afterwards, their coach McLaughlin admitted: "In the first half we didn't turn our possession into points and again we paid the consequences. We've got to look at it and say it's not acceptable, not good enough.
"Okay, we got a point but we really should have got the victory tonight. Rory Best went off (early in the second half) and we lost our composure. This group of players has got to take a big look at themselves and realise that we can't stop playing."
The victory extended Edinburgh's winning streak in the league to three matches, on the back of wins over Leinster (home) and Aironi Rugby (away).
Keen to keep his players' feet on the ground, Edinburgh coach Rob Moffat said: "We'll not get carried away because we have Leinster in Dublin next week, and that's the one team we haven't beaten away from home.
"But I was pleased with the way the boys dug in tonight and hopefully that will take us up a couple of places in the table.
"The effort we have put in in recent weeks has been top notch and we maybe haven't got the rewards we deserved, and I think we did tonight.
"The conditions weren't great, and we couldn't get our game going and play the type of rugby we wanted to play, but that's life and you have to adapt. The one minus for me was the amount of silly penalties we gave away.
"We have to learn from that because when you give away a penalty you're not going to have the ball for the next few minutes. The forwards put in a good shift tonight, but all in all it was a good effort and now we need to get real consistency in our performances."
|Edinburgh Rugby Score Card|
|Ulster Rugby Score Card|