Oneworld airlines have Los Angeles to Barcelona on sale in mid-$300s for travel departures January to May 2019.
San Francisco to Barcelona is available for summer travel departures in late June at $523 with American Airlines. These are Basic Economy fares with no checked bag or advance seat purchase.
Ticket prices drop again in September and October 2019.
Iberia Airlines Los Angeles LAX – London LHR – Barcelona BCN – Madrid MAD – LAX
San Francisco to Barcelona summer travel in low $500s
San Francisco to Barcelona shows several dates on Google Flights with ticket prices at $504 for travel departures in late June and early July, however, most of these itineraries do not price out at that low fare. Perseverance in trying different combinations of flights on Google Flights or trying OTA meta-seach sites like Momondo and Skycanner might help locate some of these low fares.
American Airlines (British Airways flights)
San Francisco SFO – London LHR – Barcelona BCN – London LHR – Los Angeles LAX – SFO
$522.83 round trip Tue June 18 – Tue July 9 (there are many other options for shorter trips).