He's baaaaack! Justin Bieber made a surprise appearance at Coachella Sunday, as pal Ariana Grande's guest and fans went WILD!

Justin's taken an extended two-year break from performing and has been busy getting married to Hailey Baldwin and taking care of personal issues ... like his mental health. He posted recently that he's working on new music, but that touring most of his young life, he needed a break from the hectic routine to focus on himself.

So yesterday was a positive move for the pop star -- getting back to music and performing likely signals he's feeling stronger and ready to get back to his career. Of course Ariana is an old friend -- she opened for him on his 2013 tour and they share the same manager, Scooter Braun.

The show didn't go off without a hitch, however, there were technical difficulties that made it difficult to hear Bieber over the loud backing track. But the show DID go on and Justin told fans, "I haven’t been on stage in, like, two years. I came out here, [and] I had no idea I was going to be on this stage tonight -- absolutely no idea. I wore this fly outfit not knowing that I was going to be on stage. I had to get my groove back, I had to get my swag back, you know what I’m saying? So, thank you so much, Coachella. Thank you so much, Ariana Grande. We love you so much, man. Thank you so much.”

Then he closed by telling fans, “By the way, album coming soon." Yaaaaasssss!