The German pair claimed their fourth pairs crown by a margin of just 0.11 points after committing errors in their four-and-a-half minute routine to music from the Pina film soundtrack.
Szolkowy slipped up on a spin and double axel jump during their free skate, nearly costing them the title.
"I was very angry at him [Szolkowy] for messing up the spin," said Savchenko.
"But now we are very, very happy to be world champions for the fourth time.
But mistakes like that mustn't happen; we'll have to learn from our mistakes today."
Olympic bronze medallists Savchenko, 28, and Szolkowy, 32, who also won in 2008, 2009 and 2011, are the first pairs skaters to win four world titles since Soviet duo Ekaterina Gordeeva and Sergei Grinkov in the 1980s.
A stunning performance to Black Swan by Tatiana Volosozhar and Maxim Trankov saw the Russians win the free skate but they had to settle for a second straight world silver after placing eighth in Wednesday's short programme.
"We feel something special today," said Trankov on Friday. "It's never happened before (to jump from eighth). We had a horrible performance in the short programme. We had never performed so bad, but we got a lot of messages from around the world encouraging us for the free skate and that pushed us today."
Volosozhar and Trankov scored 140.90 for the free skate with Savchenko and Szolkowy achieving 132.86, but their combined scores gave the Germans 201.49 to the Russians' 201.38.
Young Japanese pair Narumi Takahashi and Mervin Tran held their third spot from the short progamme to give Japan a first international pairs medal.
They scored 124.32 for their performance to Concerto de Quebec by Andre Mathieu for an overall total of 189.69.
China's Pang Qing and Tong Jian, the 2006 and 2010 world champions, dropped to fourth after Tong fell on their opening triple toe loop jump.
Story continues below…
"We hadn't competed internationally for a year. We weren't really prepared. This was probably our worst ever competition," said the Chinese pair after their performance.
The championship enters its final day on Saturday with the ladies free skating final in which Alena Leonova will bid to put Russia back on the podium for the first time since 2005.