Edinburgh picked up just their second away victory since January.
Tim Visser, Matt Scott and Stuart McInally all crossed for the Scottish side in Galway, with Willie Faloon and Danie Poolman touching down for the hosts.
Greig Laidlaw provided the assists for the Scott and McInally tries, in addition to his kicking haul of three conversions and a penalty.
Former Scotland outside-half Dan Parks, who finished with 13 points, had a late chance to win it for Connacht but his drop goal effort shaved the right hand post.
One of Edinburgh's five returning internationals, Visser, swept through for a typically opportunist try inside the opening five minutes at the Sportsground.
A poor pass from Parks put centre Poolman under pressure, the grounded ball was hacked on and Visser nudged it on further - 30 metres out - to get the touchdown.
Connacht were beaten by the Scotland winger's searing pace and Laidlaw followed up with an accurate conversion for an early 7-0 buffer.
The scores came thick and fast in the opening quarter, Connacht hitting back after a Parks cross-field kick was taken into touch by the covering Tom Brown.
From the resulting lineout, the hosts worked a well-executed drive and flanker Faloon plunged over with Parks' conversion levelling the sides.
Some of that good work was undone though when Connacht infringed straight from the restart, allowing Laidlaw to kick the Scots back ahead.
Although Edinburgh had the better of possession, they lacked the territory to hammer home that advantage and Michael Bradley's men had to bide their time.
Parks made it 10-all with a 17th minute penalty, however the hosts were left reeling when captain Gavin Duffy was forced off with a knock - adding to an injury list which numbered 17 pre-match.
Edinburgh swooped for their second try closing in on the interval, industrious number 8 McInally securing clean lineout ball and Scott scoring off Laidlaw's well-weighted chip through.
Laidlaw's conversion was cancelled out by a late penalty from Parks, who rewarded Brett Wilkinson for winning a scrum decision.
Trailing 17-13 at the break, Connacht almost handed Edinburgh a soft try in the opening minutes of the second period.
Parks was swarmed over as he attempted a drop goal, it was blocked and McInally showed great pace to press forward. The breakaway ended with Scott knocking on close to the line.
Parks lifted the westerners with a 58th minute penalty, but Edinburgh continued to show more of a try-scoring threat. Replacement scrum-half Chris Leck was unfortunate to fumble after a sparkling three-man break.
Young full-back Robbie Henshaw did well to stop David Denton on another dangerous attack, yet Edinburgh's persistence paid off when Laidlaw's inside pass put McInally over for a deserved score.
The conversion followed although Connacht had Edinburgh sweating in the final minutes. The home side lifted the tempo with Henshaw and Fetu'u Vainikolo coming alive in attack.
A slick back-line move, with Henshaw cutting a very good line, ended with Poolman scoring out wide. Parks swung over the conversion to make it a one-point game.
The ensuing 10 minutes saw proceedings swing in Connacht's favour, but they failed to muster a match-winning score with Parks' drop goal attempt the closest they came.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The Barbarians are one of the top invitational rugby sides with a long history and classic rugby jersey.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Lions get ready for their matches with this green training jersey. It's what the players wear. Get in the Gear!
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
$29.99
The Lions are ready to get their Australia tour underway. They arrive in Perth on Monday.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.