The Lionesses needed an unlikely set of results to retain the title they won in 2019 for the first time and beating a neat and tidy Spain side was part of that scenario.
England were the better side in the first half, but failed to make the breakthrough.
After the break, Phil Neville's side struggled against the Spanish and had keeper Carly Telford to thank for a number of important saves.
But even she couldn't prevent Alexia Putella's 84th-minute header and defeat to a side ranked 13th in the world.
The result leaves USA needing just a point from their final game against Japan to win the competition for the third time in five years.
After the game, Steph Houghton said: "For periods of the game, we were on top buy Spain are a technical side and they scored a goal from a set-piece which is disappointing and something we need to look at."
It's also England's seventh loss in 11 games.
Elsewhere, Canada secured a 2-2 draw with Brazil inn the Tournoi de France with City's Janine Beckie bagging an 87th-minute leveller.
Canada finished bottom of the group.
Caroline Weir was a substitute in a 2-1 win over Northern Ireland who won the Pinatar Cup.
Scotland won all three of their games in a competition that included Ukraine and Iceland.