The most convenient way is to take the Aerobús. It stops at Plaça Catalunya; from there, the Gothic Quarter is only a street away. Aerobús leaves every 15 minutes from airport. You can buy tickets online, at the bus stop, at vending machines, or directly from the bus driver.