The Latvians scored two goals in the final third to take the lead, but could not hold on in regulation time.
Kaspars Daugaviņš scored the winning goal in extra time. Rodrigo Ābols and Roberts Bukarts scored for Latvia in regulation time.
In the group round, Latvia will play against Kazakhstan (May 14), Germany (May 15), Sweden (May 18), Slovakia (May 19) and USA (May 21). The four strongest teams in the group will advance to the quarter-finals. The medal winners will be announced in Prague on May 26.
All World Championship matches can be seen live on LSM.lv.