It was the 14th championship game for Japan, which was making its fourth straight appearance in the title game, and ninth championship. California, making its 23rd championship-game appearance, has won seven World Series titles.
Giancarlo Cortez had a two-run single and Grant Holman an RBI single for Chula Vista.
Trailing 4-3 after Cortez's clutch single in the fourth, Japan tied it on Takagi's second homer and won it when Hirooka lined a 2-2 pitch down the left-field line for a double.
California beat Westport, Conn., 12-1 in the U.S. championship game Saturday, while Japan beat Mexico 3-2 for the international title.
Japan finished the tournament undefeated but had to rally to beat the Americans, who left 12 runners on base in a game that was there for the taking.
Facing one last threat in the sixth, the Japanese players erupted in glee, tossing manager Masumi Omae in the air near the mound after his slick fielders had turned a game-ending double play.
Unbeaten, too, entering the game, Chula Vista struck early to send a message that it would be a tense affair.
Keyed by the shaggy-haired duo of Micah Pietila-Wiggs and Jake Espinoza at the top of the order, California scored twice in the top of the first against Japan starter Kazuki Ishida to put the pressure on. Pietila-Wiggs was hit by a pitch leading off and Espinoza lined a double down the left-field line. Pietila-Wiggs came around to score on a passed ball and Holman singled home Espinoza.
California received a scare when Cortez was hit by a pitch in the helmet during the first inning and departed for a pinch-runner after being examined on the field. Ishida went over to shake Cortez's hand and apologize, and Cortez returned to play his position when Chula Vista took the field for the first time.
Holman, who pitched a no-hitter earlier in the World Series, hadn't pitched since Wednesday and was shaky at the outset, walking two of the first three batters he faced and throwing a wild pitch as Japan quickly mounted a threat of its own and tied the score.
Takuma Gomi, whose dramatic solo home run in the top of the sixth had given Japan a 3-2 victory over Mexico in the international championship on Saturday, lined an RBI single. A botched throw in from the outfield on the hit sailed wide of home plate, allowing Takagi, who had walked, to score the second run.
California escaped further damage when Kyousuke Kobayashi singled to center and Espinoza threw out Gomi at home.
The West champions mounted another threat in the second, loading the bases with two outs. But Holman struck out, waving his bat ever-so-slightly at a pitch that was low and outside and shaking his head in dismay at the call.
If Japan had a plan, it likely was to make the hard-throwing Holman work, and the tall right-hander did just that. When he struck out Sho Miyao looking to end the second inning, he had thrown 50 pitches. Not a good omen for the West champions with a maximum of 85 allowed and Nick Mora, the hero of Saturday's win over Connecticut with a 10-strikeout, two-hit performance, ineligible to pitch.
Ishida wasn't faring any better. After three innings he had thrown 69 pitches, struck out five, walked three, and hit three batters.
Japan took a 3-2 lead when Takagi led off the bottom of the third by slamming a home run over the right-field fence on an 0-1 pitch. A smile on his face, Takagi raised his right arm in triumph as he rounded the bases and was mobbed by his teammates after crossing the plate.
Holman avoided further damage by striking out pinch-hitter Tatsuki Nagano and getting pinch-hitter Seiya Nishino to ground out to first with two runners on. When he went to the dugout, Holman had only three pitches left to reach the maximum of 85 and was relieved by Ricky Tibbett.
The Japanese pitchers kept the hot-hitting Pietila-Wiggs off-balance at the plate, but after getting fooled by a pitch in the top of the fourth he laced a ground-rule double down the left-field line. Espinoza followed with a bloop single to left and took second on the throw in.
Ishida then hit Mora to load the bases, tying the World Series record for most hit batsmen in a game, and Keita Saito came on in relief.
Batting for the second straight time with the bases loaded, Holman, who hit a grand slam earlier in the World Series, grounded to third and Japan got the forceout at home for the first out.
A day earlier, Japan twice escaped big jams in the win over Mexico, once with the bases loaded and nobody out. This time they failed as Cortez laced a two-run single to left field for a 4-3 lead.
Ricky Tibbett relieved Holman in the fourth and retired the side in order, striking out two, as Chula Vista crept that much closer to the title.
Patrick Archer walked leading off the fifth and Dominic Haley reached on an error by Tsuchida to give California a chance to extend its lead.
Wiggs then laced a shoulder-high fastball down the left-field line for a single to load the bases, the ball hit too hard for Archer to score from second. That proved critical when Espinoza lined to left and Archer was out at home on a strong throw by Gomi.
Mora struck out swinging to end the inning, stranding another two runners.
Japan immediately took advantage when Takagi tied the score at 4 with his second home run, a blast to center field. Gomi followed with a single, Kobayashi reached on an infield single, and Hirooka lined a 2-2 pitch down the left-field line for the game-winning hit.
Chula Vista threatened in the top of the sixth, putting two runners on, but Kobayashi got Bateman to hit a soft one-hopper to first. Kensuke Tsuchida stepped on the bag for the out and threw to second, where shortstop Sho Miyao tagged out pinch-runner Michael Gaines to end it.