Barbarians were a 2nd edition class. It just wasn't implemented in BG 1, and was added later, either with ToB or BG 2. And he's still a ranger in lore, even if an unusual one.
Actually barbarian was a first edition AD&D class. It was introduced in the "Unearthed Arcana" rulebook along with the cavalier. For some reason both were removed in AD&D 2nd edition, only to be later reintroduced as "kits" in the "Complete Fighter's Handbook".