Eni Aluko had quickly cancelled out Veronica Boquete’s fourth-minute opener, before Spain took a late lead through Jenni Hermoso.
Laura Bassett drew England level a second time, but, with the match heading for yet another draw at these finals in Sweden, a cross from Adriana Martin went in off Bardsley’s face to hand Spain a surprise win over the fourth-favourites, their first over England since 1996.
With France winning their Group C opener against Russia, it means England really need to win their next match if they are to qualify for the second round.
Had England held Spain it would have been a fifth draw from the six opening games of these finals.
As with the men’s game, the Spanish are seen as technically superior, but in women’s football England’s physical advantage – and relatively smaller technical discrepancy – makes them the more dominant force.
Spain are rank outsiders in women’s football, with this their first tournament appearance since 1997.
But the Spanish started like favourites, pressurising England from kick-off and taking an early lead when exciting Sweden-based forward Boquete exploited some terrible positional play by the centre backs to race clear and fire in off keeper Bardsley.
England hit back almost immediately though. A fine passing move involving Jill Scott and Farah Williams saw Aluko put through and, while she was helped by poor defending from Ruth Garcia, the Chelsea winger made no mistake with a low clinical finish inside the far post.
Both keepers then made good stops, Spain’s Ainhoa Tirapu doing well to deny Williams before Bardsley kept out a Sonia Bermudez effort, but from the quarter-hour onwards the match descended into a scrappy affair.
Spain’s passing was typically attractive but, with neither side taking too many risks, a quiet spell followed.
There were a couple of chances just before the break, as Adriana Martin finished wide before Ellen White was denied a straightforward finish by Irene Paredes’s block.
The second half started much like the first, as England looked to attack from the off, while Spain carved out two excellent chances, Bassett denying Boquete a simple finish before Martin drilled wide when she should have scored.
England were struggling defensively, with the usually excellent Steph Houghton looking under the weather and both centre-backs regularly leaving gaps for the quick-witted Boquete to exploit.
They were also giving the ball away, in open and set plays, allowing Spain to get far too much possession.
There was half a chance for Hope Powell’s side when White found herself in space on the right, but her low cross missed Williams while Rachel Yankey was unable to finish.
As the game progressed though England’s superior physical state came into play as the likes of Aluko, White, Yankey and both Jill and Alex Scott started to run rings around Spain’s tiring defence.
England were, at times, their own worst enemy as Vicky Loseda’s long ball bounced over keeper Bardsley, who managed to touch it away from goal but only as far as Boquete – who fired against the bar with the net at her mercy.
White then missed a great opportunity, sliding in to finish wide after excellent play by substitute Karen Carney.
That precipitated a late flourish as both sides went for broke. Substitute Alexia Putellas almost went all the way with a solo run, before a late corner appeared to hand Spain the win.
England failed to clear it and, with their defence panicking and Bardsley out of position, Hermoso was able to pick her spot to put La Rioja ahead.
But, as with the first goal, England were soon level. That too came from a corner, which was delicately flicked on by Anita Asante for Bassett to guide the ball home.
England’s women have a habit of self-destructing on occasion though and, with Bardsley looking shaky on crosses all evening, it was perhaps no surprise that – deep into injury time – she should be distracted by the presence of Putellas.
Martin’s cross struck Bardsley square on the face, flying into the back of the net to hand Spain a famous win.
With Ignacio Quereda’s side expected to beat Russia, England now have to aim for at least a win and a draw from their next two matches. If they defend like they did here, an early exit looks likely.
WOMAN OF THE MATCH: Veronica Boquete (Spain) - Took her goal well and was a constant thorn in England's side. Quick and skilful, she is every inch a Spanish forward.