The Dutch-based forward powered home a close-range header from Yuichi Komano's cross just when the Japanese appeared to be running out of ideas in front of 42,000 in Niigata.
Midfielder Keisuke Honda blazed just over with barely a minute gone, but that was close as Japan got in a disappointing performance from the Blue Samurai until Havenaar's winner.
"It was a relief to score," Havenaar told reporters. "I haven't been putting them away of late so it felt good to stick one in. The next game is the big one and we have to win it."
Japan coach Alberto Zaccheroni made no bones about the fact there was plenty to work on before his side face Iraq in a World Cup qualifier on Tuesday.
"The result was important but equally important was to measure where we are before the Iraq game," said the Italian.
"There was positives and negatives to take from tonight but we can go away and analyse the performance now. It was important to check the condition of the team and individual players."
Shinji Kagawa was hauled off at halftime after annoying Zaccheroni with one too many stepovers, the last of which left him in a heap as he tripped over his own feet.
Japan's big-name midfielders were overshadowed by frizzy-haired playmaker Omar Abdulrahman, the 20-year-old at the heart of the away side's best moves.
Captain Makoto Hasegawa and Honda were also substituted early ahead of next week's clash with Iraq, currently under the stewardship of former Japan coach Zico.
Japan overpowered Oman 3-0 and Jordan 6-0 at home before being held 1-1 in Australia in June in their first three games in the final round of Asian 2014 World Cup qualifiers.
The Blue Samurai lead World Cup qualifying Group B by five points from Iraq, Australia and Jordan.
- Yuichi Komano
- Keisuke Honda