Marc-Andre ter Stegen made a costly error to condemn Barcelona to a 4-3 defeat against Celta Vigo on Sunday.