With all this gold, Spain went on a buying spree, weapons, art, churches etc - and the sellers(rest of Europe) industrialized as the gold trickled down into THEIR economies.
When the gold no longer arrived, Spain went into a steady decline as their rich upper crust of RC Churche, Kings, Queens, Lords, Ladies etc. and eventually became democratic after Franco.