David Alegre converted from an indirect set piece.
The Spanish domination in first half was complete as Alex Fabregas picked up a loose ball in the centre and bang home in the 27th minute to give them a 4-0 lead.
A minute later, India found their first goal through Sardar Singh after a good move orchestrated by Dhananjay Mahadik and S.V. Sunil
In the second half India came back with well coordinated onslaughts.
They reduced the margin in the 54th minute after a combination sortie by Shivendra Singh and Chandi and Pillay slotted past Cortes.
Pillay struck again three minutes later and converted a penalty stroke as India reduced the margin to 3-4.
Sandeep struck the last goal for India in the 66th minute after a good move from Rajpal and Arjun Halappa.
In the last minute of play, Sala struck to give Spain a 5-4 win.
India now travel to Amsterdam for the final leg of their European tour where they will play two matches against the Netherlands.