Carli Lloyd scored in the eighth and 54th minutes for the Americans, who lost to the Japanese in penalty kicks at last year's World Cup final.
Yuki Ogimi scored in the 63rd for Japan.
The U.S. team has won three consecutive Olympic titles and four of five since women's football was introduced at the 1996 Atlanta Games.
The match drew 80,203 to Wembley Stadium, breaking the record for a women's football game at the Olympics.
Canada won the bronze earlier Thursday, beating France 1-0.Suggest a correction