The hosts got off to a rapid start as Ross Moriarty powered his way over the try line in the first minute off the back of a driving maul.
© Getty Images
However, Connacht responded immediately in an end-to-end first half as Carty dodged a tackle and dived over the line to give them a half-time advantage.
Laidlaw and Carty exchanged penalties after the break, but Connacht pulled clear again through winger Matt Healy, who dived over deep in the corner.
Carty added another penalty late on, but Bill Meakes crashed over in the final minute to give his side hope and Laidlaw slotted over the conversion to take the game to extra time.
James Hook put Gloucester ahead with a penalty in the 12th minute, but Healy came in off the left flank, collected a pass and scored a try under the posts.
However, Gloucester hit back in style as Darren Dawidiuk powered over off the back of a driving maul, before Jonny May was played in by Billy Twelvetrees to score another just two minutes later and secure the win.