The decisive second goal came deep into the half when Lionel Messi (who came on as a second-half substitute) bagged his 17th consecutive league goal in the 88th minute, deftly putting the ball over goalkeeper Aranzubia.
The visitors had taken a surprise lead in the 17th minute when Juanlu Hens latched on to a pass from Pablo Sicilia in the area and fired a low shot through the legs of Alberto Lopo and past Depor goalkeeper Daniel Aranzubia.