Denmark beat defending champion France in a sprint finish for silver. Australia finished 14th.
For 2017 the Team Relay made a significant change to the format, adding a fifth rider to each team. Now, each squad must include a Junior or under-23 women, in addition to an elite man and woman, Under-23 man and junior man.
"The addition of a fifth rider did not change our strategy," Olympic champion Nino Schurter said. "We have always gone with a fast starter, with Filippo [Colombo] doing the start for us here and myself going last.
"Adding this [fifth] rider makes the strong nations even stronger because it is hard for the small nations to have a good rider in every category. So the new Team Relay is even better for us."
The UCI MTB World Championships men's and women's elite XCO and DHI events will be broadcast live on SBS Viceland and streaming online Saturday 9 and Sunday 10 September.
Sam Gaze of New Zealand jumped out to a strong lead on the first lap, but Italy took over on the second lap with a ride by Junior man Juri Zanotti. It was the turn of Canada to move into the lead on Lap 3 with Junior man Holden Jones, and they extended their lead on the fourth lap to over a minute by the start of the final lap as former world champion Catharine Pendrel rode.
However, World Cup champion Schurter was the final rider for Switzerland, while Canada had under-23 woman Anne-Julie Tremblay, and Schurter powered into the lead by the halfway mark of the lap, to give Switzerland their first Team Relay title since 2010.
Switzerland began with their under-23 man, Filippo Colombo, followed by their Junior man Joel Roth, then under-23 woman Sina Frei, followed by Elite riders Jolanda Neff and Schurter.