San Francisco to Barcelona is down to $310 round trip for travel from January to March with nonstop flights on Level, operated by Iberia Airlines. While that is a great fare, there are many destinations in Europe available for under $400 round trip for winter 2019 travel.
The more impressive deal I see are SFO-BCN Star Alliance flights for travel all summer from June through August at $410 to $460 round trip.
Google Flights is useful for finding low fare dates, but most dates do not have direct links through Google Flights. Skyscanner.com pulls up these fares with a variety of online travel agency choices for ticketing.
Expedia.com has many of these airfares.
Expedia.com Swiss Airlines San Francisco SFO – Zurich ZRH – Barcelona BCN – ZRH – SFO
ExploreTrip.com United Airlines San Francisco SFO – Newark EWR – Barcelona BCN – ZRH – SFO
San Francisco – Barcelona Winter Flights $310 round trip
Level (Iberia) San Francisco SFO – Barcelona BCN nonstop
This fare includes one carry-on bag for free. One checked bag is $44 when booked at time of ticketing.
This itinerary is about $30 less if you buy two one-way tickets.
Iberia-Level Barcelona BCN – San Francisco SFO nonstop