Ulster's lead at the top of the Pro12 was cut to one point as they were dealt a first defeat by defending champions Connacht.
Connacht claimed their first win against Edinburgh last time out following a miserable start to the campaign and delivered a reminder of the quality that led them to the title last season in a 30-25 success.
The hosts surged into a 22-8 half-time lead as Jack Carty, Cian Kelleher and James Connolly all went over for scores in the opening 40 minutes.
Fly-half Carty scored seven points with the boot in a first period in which Paddy Jackson knocked over a penalty for Ulster, who capitalised on Conor Carey's sin-binning late in the half as Craig Gilroy crossed for their first try.
But the leaders flew out of the blocks following the restart, tries from Rory Best and Jared Payne - both converted by Jackson - levelling matters at 22-22 just six minutes into the second half.
Parity lasted only seven minutes, however, Kelleher's second and a further Carty penalty putting Connacht eight points ahead before Jackson's second three-pointer, with Ross Kane seeing yellow late on for the visitors as Ulster were left to settle for a losing bonus point.
The bonus point keeps Ulster ahead of Ospreys, who ran in seven tries in a comfortable 46-24 victory over Cardiff Blues.
Tries from Alun Wyn Jones, Dmitri Arhip, Ben John, Dan Evans, Josh Matavesi and an Eli Walker double ensured a five-point haul for Ospreys.
Elsewhere, Edinburgh avoided a fourth straight defeat by hammering Benetton Treviso 45-10, Damien Hoyland and Tom Brown each crossing twice.