Hansi Flick's side, aiming for a potential quadruple, outplayed the visitors but could not extend their lead at Olympic Stadium as goalkeeper Leo Roman made save after save.
With Saturday's Copa del Rey final against rivals Real in mind, Flick rested several of his usual starters.
The coach handed former teenage prodigy Ansu Fati his first start since October and deployed Hector Fort on the left of the defence, with Ferran Torres up front in place of injured top scorer Robert Lewandowski.
"We had a good game, the whole team, there were a lot of rotations with players who hadn't played for a while and I'm really happy for them," Gavi told Movistar.
"Their goalkeeper had a great game, we had so many chances but that's football, they're not going to make it easy."
Barca created several chances in the first half and could hardly believe the score was goalless at the break.
Gavi's deflected shot hit the post, while Torres fired over after Olmo played him in.
Fati also fired narrowly off target as the hosts turned the screw, and Roman saved from teenage star Lamine Yamal, before Fort's shot was blocked as Mallorca rode their luck.
Now 22 and struggling for minutes at Barca, Fati drilled wide of the near post when he might have tested the increasingly-busy Roman, before Mateu Morey blasted home at the other end but was offside.
Barca left the pitch frustrated but swiftly took the lead at the start of the second half, with Olmo firing home less than a minute in, after a long string of passes.
Fati came close to a second but Roman palmed his drive to safety.
Flick sent on Raphinha and Fermin Lopez to try and finish the job.
Yamal should have added Barca's second when the excellent Pedri sent him through, but Roman made yet another save.
The goalkeeper showed good reflexes to thwart Eric Garcia and then clawed out Lopez's deflected shot when it looked like it was dipping over his head for his 10th save of the night.
It was Roman's first appearance in the league in 2025 for Mallorca and although he and his side left without a point to show for it, another save to deny Lopez towards the end underlined his outstanding display.
"The coach has a huge problem deciding (between Roman and usual goalkeeper Dominik Grief)," said Mallorca defender Jose Copete.
"Leo's been training really well, he hadn't played for so long, and you just have to see how he played in a tricky game like today's."
Mallorca appealed for a penalty in stoppage time when Garcia held Abdon Prats in the box but their appeals were waved away.
Barca have five games remaining in LaLiga, including a mouthwatering Clasico showdown against Real on May 11.
RESULTS
Valencia 1 (Guerra 57) Espanyol 1 (Puado 40)
Barcelona 1 (Olmo 46) Mallorca 0
Comment: