Justin Bieber and Selena Gomez are working things out in couples therapy because of a fight over Hailey Baldwin ... TMZ has learned.

Sources connected to Hillsong Church tell us Justin has been trying to make amends lately as part of his renewed faith ... and decided to do that with Hailey. We're told he reached out to clear the air over their brief relationship and sour breakup.

Next, as part of his new "open and honest" approach to life, Justin told Selena about his convo with Hailey -- and let's just say it went over like a fart in church. We're told she wasn't thrilled with him being in contact with an ex ... and that's when they decided to give Christian couples therapy a try.

Our sources say they've been going for about a week now, and as we've reported, it's not sitting well with Selena's mom.

Beliebers probably noticed JB's been posting more words of wisdom lately ... it's a good bet he's picking 'em up in therapy.