Barlin is a commune in the Pas-de-Calais department in the Hauts-de-France region in northern France.