Celtic midfielder Shunsuke Nakamura had an early penalty saved and Keisuke Honda missed an open goal moments before the break after Yasuhito Endo's free kick had hit the crossbar.
Nakamura, making his 78th international appearance and surpassing former team mate Hidetoshi Nakata to go fifth on Japan's list, was at the heart of his side's best moves.
But Japan almost paid for some woeful finishing and looked like settling for second place behind the Gulf side in the group standings until Uchida's 89th minute fluke goal.
As Bahrain struggled to clear the ball, Uchida's harmless-looking header back into the box bounced over Bahrain goalkeeper Sayed Jaffer and into the back of the net.
"The players never gave up and kept pressing for a goal," said Japan coach Takeshi Okada, who had been under fire after his side were beaten 1-0 by Bahrain in March.
"We didn't play badly. We just need to be sharper with our finishing. We lost a bit of rhythm in the second half but we will improve and I'm confident we will get through the final round of qualifiers."