Catalonia was a part of Spain beginning just before Columbus’ trip to the New World, and only became an “autonomous region” after the death of Franco.
Catalonia was part of the Crown of Aragon, under a Trastamara dynasty, which became part of the Kingdom of Spain when Ferdinand and Isabela married and united their lands.
Most of Spain’s regions however were under rather loose Royal control, with nearly all government being local and any contributions to the monarchy a matter of local deals. The attempt by various Spanish central governments to impose common governance was the cause of many rebellions and civil wars.