One of my favorite places in Barcelona is Can Masdeu. Can Masdeu is a former leper hospital which had been abandoned for over 50 years. It is now occupied by squatters and serves as a social center, residence, and community garden. The grounds governed by the squats are used as gardens and for agriculture.
It is also possible to participate in activities related to agriculture, ecology, activism, and the like. Those events take place mostly on Sundays. Nevertheless, even when the place is closed you can walk in and explore the beautiful gardens.
Can Masdeu is located in the Collserola Park on the outskirts of the city. The best way to get there is taking the Metro to Canyelles. From there you can walk to the site. There are small walking trails and even some picnic spots. The walk is awesome in spring when most plants are blooming. Besides the trail offers amazing views of the city.