The Catalan club got the victory despite playing without the injured Lamine Yamal.
It was the third win in four matches to open the season for Barcelona, who moved within two points of early leaders Real Madrid.
Barcelona had to play their first home league game of the season at the 6000-capacity Estadi Johan Cruyff while waiting for permits that will allow them to return to the Camp Nou, which will seat nearly 100,000 fans.
The hosts were in control from the start. Lopez scored his goals in the 29th and 56th minutes, Raphinha netted in the 53rd and 66th and Lewandowski got on the board in the 76th and 86th.
Both Raphinha and Lewandowski scored their goals after coming off the bench. Unconfirmed media reports said Raphinha did not start because he was late reporting to the team on Sunday, though Barcelona coach Hansi Flick later said it was a technical decision following his stint with Brazil during the international break.
Poland international Lewandowski, playing his 150th game with Barcelona, had not previously netted for the club in this league season.
"We were in control from the start. We knew what we had to do to get the victory," Barcelona midfielder Marc Casado said.
"We played our game. The scoring chances and the goals came."
Valencia, sitting near the bottom of the standings with two losses, had only two attempts with one of them on target.
Elsewhere, Socceroos goalkeeper Mat Ryan's Levante gave up an early two-goal lead to draw 2-2 at home with Real Betis.
Osasuna won for the second time by beating Rayo Vallecano 2-0, while Celta Vigo earned a 1-1 draw with Girona at home thanks to an added-time penalty kick converted by Borja Iglesias.
With AAP.