After Elodie Thomis had cancelled out Lotta Schelin's strike, Hammarstrom's thunderbolt settled the game and handed Sweden the win.
The game was scrappy at first with neither team able to get hold of possession for any length of time and a lot of challenges breaking up the play in midfield.
Sweden had the first real chance of the game though, putting the ball in the net on six minutes before it was ruled out - wrongly as replays showed.
Linda Forsberg headed a poor Berangere Sapowicz clearance back over the heads of the French back line to find the run of Schelin who calmly slotted home as the keeper rushed out to meet her. The lineswoman had her flag up though and the goal was ruled out, although replays showed she was just onside.
France came back into the match and were starting to dominate until Sweden grabbed the first goal of the game against the run of play on 28 minutes.
The ball over the top for Schelin to chase was again the Swedes' weapon of choice as Annica Svensson played a great diagonal pass to find the striker and she was very composed as Sapowicz came towards her, tucking the ball away delicately to put her team ahead.
France nearly came back into it 10 minutes later when the dangerous Elise Bussaglia got on the ball 25 yards out and tried to curl the ball into the far corner; it looked for all the world that it was going in but it came back off the post.
That was the closest the French came in the first half as it was Sweden that nearly doubled their lead before the break, firstly through a Charlotte Rohlin header and then through the excellent Schelin.
After the interval France came back into the game well, mostly through the substitute Thomis who had replaced the injured Louisa Necib in the first half.
The pace of Thomis was causing the Sweden back four some serious problems and it was her that levelled the game up just 12 minutes into the second half.
Thiney picked her out with a great through ball and Thomis had timed her run to perfection before she hit a well-placed and powerful shot to beat Hedvig Lindahl at her near post.
Sweden responded well and should have gone back ahead after 64 minutes when Josefine Oqvist was played in by the captain Nilla Fischer; she was in on goal and beat the keeper but her shot just trickled on to the post.
With hindsight she should have squared it to the unmarked Schelin who would have had an open goal in front of her.
Sweden were pressing for the winner but it almost went wrong for them with 20 minutes to go as Oqvist got herself sent off.
The striker was challenging with French full-back Sonia Bompastor and, as they went to ground Bompastor kicked out - Oqvist responded with interest and put her studs right into the chest of her opponent, the referee saw it and had no choice but to brandish the red card.
There was no doubt it was a sending off but Bompastor was lucky to avoid any punishment herself.
France had the chance to make the most of their numerical advantage but seemed to take their foot off the pedal a bit and let Sweden have time on the ball when they could have made it very difficult for them.
Sweden made the French pay for their lack of dynamism as they retook the lead with just eight minutes left through the substitute Hammarstrom.
A corner was only partially cleared to the edge of the box and Hammarstrom chipped it over Eugenie Le Sommer then put it on her left foot and unleashed a crashing volley into the top corner.
It was a stunning strike that was worthy of winning any game - and in this case it did, as France could not create anything before the final whistle.
On the balance of the game Sweden deserved to win, but it had been a really competitive contest and a great spectacle.