Castro, nicknamed 'Quini', scored 54 league goals in 100 games for Barca and won two Copas del Rey (1981, 1983), as well as the UEFA Cup Winners' Cup (1982).
He died in Gijon after suffering a heart attack.
A statement from Barcelona read: "Enrique Castro 'Quini' dies (1949-2018), player and legend of our Club. The Camp Nou will never forget your legacy, RIP."
Enrique Castro 'Quini' dies (1949-2018), a player and legend of our Club. The Camp Nou will never forget your legacy. RIP pic.twitter.com/BO3XiebuUB— FC Barcelona (@FCBarcelona) February 27, 2018
Castro also spent two spells at Sporting Gijon, the first of which spanned 12 years.
"Quini has left us, Rest In Peace our myth," a statement from Sporting read.
An international with Spain, Castro played at the World Cup in 1978 and 1982, as well as the European Championship in 1980.
He scored eight goals in 35 appearances for the national side.
Every Thursday we'll deliver a free dose of news and views from Spain straight into your inbox. The newsletter will inform you about what's going on in Spain and (hopefully) entertain you with a selection of features. Sign up here.