Betis – itself in the hunt for Champions League qualification – frustrated the leader for over an hour on Thursday (AEDT), with Manuel Pellegrini's men defending resolutely and Pedri missing two good chances.
However, Raphinha bundled in a delivery from the impressive Alejandro Balde, before Lewandowski converted following a corner to put Xavi's side in control.
Jules Kounde's late own goal ensured a nervy ending, but Barca held on to pile more pressure on Real Madrid ahead of their fixture against Valencia on Friday.
Luiz Henrique saw a shot deflect narrowly wide as Betis edged a scrappy opening, before the offside flag foiled Raphinha when he nodded in Frenkie de Jong's inviting cross after 33 minutes.
Barcelona improved before the interval, but they were denied by a strong save from Rui Silva when a fortunate deflection sent Pedri through on goal.
Pedri drew another reflex save from Silva within three minutes of the restart after being teed up by Balde's cut-back, before Barca finally made the breakthrough 65 minutes in.
Balde was involved once again with a driving run down the left after a quick free-kick, teeing up Raphinha for a tap-in with a powerful low cross.
Lewandowski – playing his first league game of 2023 after serving a three-match ban – doubled Barca's lead with 10 minutes left, swivelling to find the bottom-left corner after Ronald Araujo's flick-on.
Betis ensured a tense finish when Kounde bizarrely netted at the wrong end with five minutes remaining, but Barca held on for its fourth successive league win.