On a night of upsets in Pool Six, the rain-soaked Sportsground witnessed an intense battle between a home team hunting for their first victory in 15 matches and the Aviva Premiership leaders.
Gloucester did Quins a huge favour in beating table toppers Toulouse, but Conor O'Shea's side blew their chances of winning the group and making sure of a quarter-final place as a nightmare scenario played out.
Niall O'Connor notched three penalty goals to push Connacht into a 9-5 half-time lead, however the hosts failed to take full advantage of a strong wind.
Sam Smith's eighth-minute try showed Harlequins' capabilities with ball in hand, but a single penalty from Nick Evans was all they could muster despite dominating possession and territory after the break.
The visitors elected to play into the elements in the first half, and pressure at scrum time on James Johnston yielded an early penalty which O'Connor stuck it over.
Quins replied in brilliant fashion, using their big ball carriers to build momentum in the 22 before Evans' flat pass sent Smith diving over in the left corner past Fetu'u Vainikolo's limp challenge.
Evans had to improvise after the ball fell off the kicking tee during his run-up, drop-kicking his conversion which spiralled wide in the difficult wind.
Johnston was pinged for another binding offence when play resumed, allowing O'Connor a long range shot which he sent over with aplomb.
Despite being starved of possession, Connacht went 9-5 ahead when O'Connor swung over a left-sided penalty after some mishandling from Quins.
In a tense second quarter, Connacht survived a couple of five-metre scrums but they failed to get their attack going - forcing passes as they tried frantically to take advantage of an increasing wind.
Connacht enjoyed some late territory, a close range surge from Mike McCarthy helping to set up O'Connor's fourth shot at goal - yet the outside-half managed to screw his easiest kick to the right and wide.
It was all Harlequins when the second half got under way, Ugo Monye just failing to hold Evans' bouncing grubber kick as Connacht's defence was immediately tested.
Connacht maintained a high tackle rate, with a doughty scrum and feisty work in contact from man-of-the-match John Muldoon and McCarthy continuing to frustrate O'Shea's charges.
Having turned down an earlier kickable penalty, Evans was called upon to add three points to the Quins tally after Muldoon infringed at a ruck.
The New Zealander did just that, making it a single-point game with 20 minutes left on the clock. It seemed enough time for the English outfit to prevail.
They had the upper hand in the scrum. Another good shunt, 13 minutes from time, gave Evans the opportunity to kick Quins ahead, but the Kiwi misjudged the wind and Connacht drew breath.
Energised by their ability to hold on to that slender lead, the hosts edged closer to their first Heineken Cup win thanks to a combination of sterling work up front and unforced errors by Quins.
Danny Care and company were unable to find space against a tiring but suffocating Connacht defence, with Eric Elwood's men holding their nerve to end a losing run which stretched back to September.
Irish eyes were smiling on the double as the results in Pool Six sent Connacht's provincial rivals Ulster through to the last eight, in advance of their final pool game against Clermont Auvergne.
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.
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.