The Japanese outplayed the Canadians at the Khalifa International Stadium, which is expected to undergo a renovation in advance of Qatar hosting the 2022 World Cup. But they did not take advantage of their scoring chances and Canada had opportunities to pull even late in the game.
Havenaar, a Japanese-born striker of Dutch descent who plays for Vitesse Arnhem in the Netherlands, swept in the winning goal on a left-footed shot from close-range after taking a cross from Hannover defender Hiroki Sakai that went through several Canadian defenders.
Marcus Haber's first international goal had given Canada a 1-1 tie.
The 58th-minute Canadian goal came from after a Kyle Bekker shot was deflected wide by a Japanese player. Will Johnson floated in the ensuing corner and Haber stooped low to get his head on it, angling the ball past goalkeeper Eiji Kawashima of Standard Liege.
Stuttgart forward Shinji Okazaki opened the scoring in the ninth minute and Japan should have had several more before Haber came to Canada's rescue.
"We are frustrated with the way we conceded the two goals," said Canada's interim head coach Tony Fonseca.
"Working to stop conceding goals from errors is something we have been focusing on, so the team is disappointed in that sense."
Japan is ranked 26th in the world, compared to No. 68 for the Canadians who play No. 62 Belarus in another friendly Monday at the city's Aspire Stadium.
Japan, the top-ranked team in the Asian confederation, was using the Canada game as a warmup for a World Cup qualifier Tuesday in Jordan. A win in Amman and Japan will become the first team to qualify for Brazil 2014
The Japanese currently lead Group B in Asian qualifying with a 4-0-1 record, having outscored its opposition 13-2.
Alberto Zaccheroni, Japan's Italian coach, was without injured CKSA Moscow playmaker Keisuke Honda and Inter Milan defender Yuto Nagatomo.
But his starting 11 Friday included eight European-based pros including attacking midfielder/forward Shinji Kagawa of Manchester United.
And the technically gifted Japanese showed their skills, building attacks with deft passing. Canada, meanwhile, shot itself in the foot with a series of giveaways and looked shaky defensively at times.
"Defensively we could have been better and that is something we will have to work on over the next few days," said Canadian midfielder Atiba Hutchinson. "That being said I thought we were good on the ball and created some good chances.
"We just have to learn from our mistakes and improve in our defending."
Still the Canadians had a bright start, controlling possession.
Okazaki put Japan ahead when he caught Milan Borjan off his line after the Canadian 'keeper had rushed to the edge of his box to make a clearance. The ball found its way to Okazaki who eluded a Canadian defender before floating a delightful chip from outside the box over Borjan.
Japan kept up the pressure and had a chance to increase the lead in the 13th minute but Ryoichi Maeda skied the ball after taking the ball alone in front of goal.
Yasuhito Endo also came close in the 20th minute when his free kick 25 yards from outside the box hit the inside of the post and nearly ricocheted in off a surprised Borjan.
The Japanese swept the ball around the pristine surface and slashing open the Canadian defence at times.
There was a rare Canadian attack in the 30th minute when Randy Edwini-Bonsu's cross floated inches above Haber's head.
Johnson shot high from 25 yards out in the 39th minute. Takashi Inui of Eintracht Frankfurt raked a shot wide from just inside the penalty box as the half came to an end.
Japan made three substitutions to open the second half. And Havenaar had an early chance to impress but Havenaar shot wide after cutting in alone.
Edwini-Bonsu forced a save from Kawashima in the 62nd minute. Three minutes later, Sakai raced past Borjan down the left side of the box but only managed to find the side netting.
Kawashima was busy in the last 10 minutes, with stops on Hutchison and substitute Tosaint Ricketts.
Borjan had to play sweeper in injury time to get the ball away from a Japanese counter-attacker.
Julian de Guzman, winning his 62nd cap, captained Canada on the day with interim coach Tony Fonseca, whose day job is the Canadian Soccer Association's technical director, directing the team from the sidelines.
Canada's starting 11 was Borjan in goal behind a back four of Nik Ledgerwood, David Edgar, Dejan Jakovic and Marcel De Jong.
De Guzman patrolled the midfield alongside Johnson and Hutchinson with Bekker and Edwini-Bonsu supporting lone striker Haber — who plays for England's Stevenage FC.
The elusive Edwini-Bonsu, along with Haber making his first senior start, was one of the more impressive Canadians with several darting runs down the right flank.
It marked the first national team action for starters Edgar, de Guzman, Hutchinson, Johnson and Ledgerwood since an 8-1 humiliation in Honduras last October that marked the end of Canada's World Cup qualifying road.
Andre Hainault, Stefan Cebara, Simeon Jackson, Issey Nakajima-Farran and Ricketts came on as a second-half substitutes for Canada.
"There were some young players that showed they might be part of a future generation for Canada. We are encouraged by that," said Fonseca.
It was the first senior cap for Cebara, who plays for Nogometni Klub Celje in Slovenia.
Canada’s next scheduled action will be CONCACAF Gold Cup this summer in the U.S.
NOTES — Canada's last meeting with Japan was a 3-0 loss at the 2001 FIFA Confederations Cup ... Midfielder Samuel Piette did not make the Canadian camp after picking up a slight injury in Germany with his club team.