The 27-year-old Spanovic, who won bronze and silver in the past two world indoor championships, completed her medal set with a world-best leap of 6.96 metres.
"I have tried to win this title so many times and finally I managed to produce gold," she said.
Reese, the three-time champion, was seeking an astonishing ninth major gold medal in as many years but could only respond with 6.89 for silver while Germany's Sosthene Moguenara-Taroum took bronze, her first indoor medal, with a jump of 6.85.
Two years ago the story was very different with Reese snatching gold from Spanovic with the penultimate jump of the world indoor final in Portland.
More disappointment followed for Spanovic in last year's world outdoor championships in London when she missed out on a medal in a sixth successive global championship by one centimetre.
This time a different story unfolded with Spanovic's confidence boosted by knowing she was world leader going into the event. She looked in complete control from her first jump, which propelled her straight to the front with 6.89.
By contrast, the 31-year-old Reese always looked slightly short of the mark and admitted she did not perform at her best. "I beat myself today," she said. "It is what it is."
Even when Reese did briefly hit the front with her fourth jump, Spanovic countered by immediately regaining the lead with what proved to be the winning jump.
I still cannot believe it even though I was preparing myself for it
"Last time I lost the world title in the final attempts so I just wanted to stay focused and waited until the very end.
"I have tried to win this title so many times and finally I managed to produce gold. Brittney Reese is a huge personality, she is a special athlete.
"We had the same goal and it was a tough battle. But I am happy she is here. She is pushing me forward and I like competing against her. Today, all the girls jumped well."