Carrick began brightly as Paul Heatley tested the home defence when he raced onto Gibson's clever pass and fired narrowly wide from the edge of the area.
Moments later, a Jack Scott free-kick deflected kindly for Billy-Joe Burns, who headed over from close range. Gibson then broke clear on 15 minutes but dragged his effort beyond the near post as Bangor held firm.
The Seasiders soon settled and should have been ahead before half-time. Kyle Owens flicked on Reece Neale's long throw, and Boyd's header crashed off the crossbar before Ben Arthurs failed to convert from the resulting corner.
Another Heatley cross caused alarm in the Bangor box just before the interval, but Scott's first-time shot flew well off target.
After the restart, Bangor continued to push forward. Substitute Mick Morgan linked neatly with Tiarnan Mulvenna, whose curled effort was brilliantly tipped wide by Nathan Gartside. The Carrick keeper remained alert to gather Morgan's header moments later and he then produced a superb reaction save to deny Arthurs from a Neale corner.
The turning point arrived when Devlin's dismissal handed Carrick the initiative. With Bangor tiring, the visitors pressed forward in stoppage time and Gibson reacted quickest to a loose ball to settle a scrappy contest and deliver three vital points for Stephen Baxter's side.