The Barracks are always Level 1 Barracks when first placed. The Level 1 Barracks allow basic building of structures. It has 1500 HP.
The Level 2 Barracks is an upgrade that costs $100 and 75m. Alongside in increasing the health of the Barracks to 3000 HP, more advanced structures are unlocked.
The third and final upgrade to the barracks costs $200 and 150m. It allows construction of all structures, and the barracks have 4500 HP at this stage.