In the final, the 30-year-old finished the 1.4km course in a time of 3:03.36, over two seconds clear of Norway's Kristine Stavas Skistad, who took silver. The bronze medal went to Nadine Fahndrich of Switzerland.
Sundling had beaten Skistad into second in both their quarter-final and semi-final earlier in the day.
For the final duel, Skistad was quickest out of the blocks, but Sundling responded well to take the lead within the first 30 seconds.
The pace she set at the front was too quick for her compatriot Maja Dahlqvist, the United States' Julia Kern and Lotta Udnes Weng of Norway, who made up the minor places in the final.
Midway through the race, a burst of speed on an uphill section allowed her to put clear daylight between her, Skistad and Fahndrich, which she was able to hold onto until the finish line.
It is a fifth world championship gold for the current Olympic sprint title holder, who was part of the Swedish contingent to also win the team sprint and the previous two events.
In the men's sprint, Norway's Johannes Hosflot Klaebo won the title for the fourth time, ahead of Federico Pellegrino of Italy. Finland's Lauri Vuorinen took bronze.