Canada's victory was the first time a country other than the US or Jamaica had won a sprint relay.
The all-powerful US team followed up on victories on Saturday in the women's 4x800m and men's 4x100m relays by clinching gold in both the men and women's 4x400m and men's 4x800m to easily top the medals table.
Merritt, whose first senior relay gold dates back to the Helsinki worlds in 2005, had teammates David Verburg, Tony McQuay and Kyle Clemons to thank for putting him out in front.
But he hadn't counted on 18-year-old Botswanan sensation Karabo Sibando, who caught the 30-year-old American up before Merritt battled down the home stretch to hold on for a nerve-racking win in 3min 02.13sec from the Africans, Jamaica taking bronze.
"We have a great group of guys here tonight," said Merritt. "They did what they had to do and I did what I do best, that's 'bring it home,' my third time here and third gold!"
Canadian De Grasse, who won three medals at last year's Rio Olympics, underlined his coming of age as Jamaican legend Bolt's own tip as world sprinting's next dominant figure by laying down a startling third leg in the 4x200m relay.
It was enough to wrest back control for Canada, teammate Aaron Brown holding off American Ameer Webb for a scintillating victory in the 4x200m relay, Jamaica taking bronze.
Canada's victory, with Gavin Smellie and Brendon Rodney running the first two legs, was the first time a country other than the US or Jamaica had won a sprint relay and made up for the disappointment of not finishing the 4x100m.
"It was a great run by all of us," said De Grasse, 22. "We came together collectively, we just wanted to keep the stick around. We told ourselves to trust each other and be patient."
Canada's win was followed by another upset as Germany picked up an unexpected gold in the women's 4x100m, Alexandra Burghardt, Lisa Mayer, Tatjana Pinto and Rebekka Haase combining to outpace Jamaica with their winning time of 42.84sec.
The US presence in the race came to an abrupt halt after first leg Tianna Bartoletta tumbled nastily to the floor before baton passover.
But otherwise, the US team shone, with self-proclaimed 'relay queen' Natasha Hastings adding yet another gold to her trophy cabinet as she ran in the anchor leg in the 4x400m in the footprints of teammates Phyllis Francis, Ashley Spencer and Quanera Hayes for victory in 3min 24.36sec, Poland taking silver ahead of Jamaica.
And Olympic bronze medallist Clayton Murphy bolted with 150 metres to run in a tactical men's 4x800m to claim an impressive win for the US team also including Brannon Kidder, Erik Sowinski and Casimir Loxsom over a strong Kenyan quartet.
The experienced Ferguson Cheruiyot Rotich had hit the final lap out in front, but Murphy gradually reeled him back in and went wide on the corner into the final straight to outpace the Kenyan.
"I took a little risk on the corner but it worked out okay," said Murphy, teammate Sowinski adding: "We know we have the best anchor so we just tried to keep it close for him so he could bring home the gold."
The race also saw the World Relays debut of the Athlete Refugee Team, comprising four runners who fled South Sudan to Kenyan refugee camps, applauded by one an all despite coming in more than a minute off the US team's winning time.
"We've never run this type of relay before so it was all new," said Paulo Amotun, who ran the second leg for the refugee team.
"We didn't run that well but with this experience we'll go home and keep working and everything will be good."
There was a fantastic, groundbreaking event to wrap up the two-day event in a mixed 4x400m, never better scripted as host nation the Bahamas won it in dramatic fashion.
With two women and two men competing for each team, running order was at their discretion, meaning that for the final two legs there were men chasing down women on the track, to the raucous delight of the crowd at the Thomas A. Robinson stadium.
After two rip-roaring legs by Steven Gardiner and Olympic champion Shaunae Miller-Uibo, Anthonique Strachan was tracked down by American Paul Dedewo, but Michael Mathieu was on hand to do the same on Claudia Francis to perhaps offer of a sight of mixed track events to come.