Laura Bassett looked to have earned Hope Powell's players a point from their Group C opener in Sweden when she hooked in an 89th-minute equaliser four minutes after Jennifer Hermoso had given Spain the lead for the second time.
But England goalkeeper Karen Bardsley ensured Spain did prevail when she diverted Adriana's cross into her own net in stoppage time (90+5) to cap a manic finale.
Powell's side reached the final four years ago, only to be thrashed 6-2 by seven-time champions Germany, but will now face a struggle to qualify from their group.
Spain took the lead in the fourth minute when Boquete finished off a flowing move up the left wing but Eniola Aluko replied just three minutes later, cooly converting Jill Scott's through-ball.
Both side had chances from range, Fara Williams forcing a firm palm from Tirapu Ainhoa with a curling shot, before Bardsley denied Sonia Bermudez to preserve the scoreline.
Vicky Losada should have put Spain back ahead 16 minutes from the time with the goal at her mercy but caught her volley too high and could only watch the ball bounce back off the crossbar.
A poor England clearance let Hermoso in as the clock ticked down but though Bassett hit back, Bardsley unwittingly settled the contest.
France had earlier beaten Russia 3-1, with the top two teams from each group joined by two of the best third-placed teams in the last eight.