Edinburgh were 22-17 behind at half-time having done very little wrong whilst playing into a blustery wind.
Scott Newlands and James King grabbed well-taken tries and Greig Laidlaw mastered the windy conditions to convert both scores, in addition to an early penalty.
Driving rain made for a scrappy second half and although Laidlaw added two more penalties, Duffy's 60th-minute try proved crucial for a Johnny O'Connor-inspired Connacht side.
There were barely 30 seconds on the clock when Ray Ofisa fed Carr, a metre out, for the hosts' opening try. Duffy showed early adventure when running a kick back and Carr's support paid off.
Ian Keatley's missed conversion was followed by Laidlaw's first penalty, and David Denton, Esteban Lozada and Fraser McKenzie all carried well for the territory-starved Scots.
A tap tackle by centre King on Ofisa prevented a certain try for Connacht, midway through the half, and Edinburgh soon bared their teeth in attack.
Nick De Luca, a late addition to the team, broke out of a couple of tackles, Mike Blair slithered into the 22 and his long pass had flanker Newlands nipping in at the right corner ahead of the covering Keatley and Mike McCarthy.
Laidlaw added an excellent conversion, which Keatley cancelled out with a penalty, but Nick Scrivener's men moved 17-8 in front on the half hour mark.
King flew through a gap between Troy Nathan and Keith Matthews and had the strength to crash over to the left of the posts for a terrific individual try.
However, Connacht finished the first half on a high with two late tries. A right wing raid led to a penalty try that saw De Luca sin-binned for tackling Carr before he received the scoring pass.
Then a neat back-line move involving Nathan and Keatley saw Connacht flood to the right again, in injury-time, and Duffy added enough momentum to put Carr over for his second try.
Laidlaw opened the scoring after the break for 14-man Edinburgh, clipping over a close-in penalty, but Connacht were winning the collisions and boasted the more reliable set piece.
Eric Elwood's charges had the lion's share of territory in the third quarter, with Sean Cronin and Keatley threatening in the visitors' 22.
It took a clever grubber kick from Keatley to unlock the Edinburgh defence, allowing Duffy to dot down in the left corner.
The conversion was missed and a third penalty from Laidlaw set up a tense finish with 12 minutes to go.
Play remained in the Connacht half, but a promising run from Edinburgh danger man Tim Visser was snuffed out when Matthews, who was making his 100th appearance for Connacht, won a relieving penalty at the next ruck.
|Connacht Rugby Score Card|
|Edinburgh Rugby Score Card|