Latvia edged Germany 52-51 on Tuesday in the opening Group F clash for the two sides.
With 10 seconds remaining and Germany leading 51 50, Aija Putnina made two free throws to put Latvia in front.
Germany still had a chance to win the contest but Franziska Hore missed a jumper with 0.7 seconds on the clock.
Anete Horelika had a game-high 20 points for the winners while team-mate Putnina added 17 while also pulling down nine rebounds.
"It was very difficult to take those free throws," admitted Putnina.
"I had missed three free throws earlier so I am very relieved that they went in.
"This victory means a lot to us because we really want to go far in this tournament."
Germany, who had led from the start, went into the last quarter with a 43-33 advantage.
Latvia went on a 10-1 surge to reduce the deficit 44 43 and eventually tied the game at 50-50 with a Dita Liepkalne three-ball.
Anna-Christine Gorg led Germany in scoring with 18 points and a whopping 17 rebounds.
Germany struggled shooting the ball from outside the arc, they were one of eight (12.8%) while their opponents were six of 20 (30%).