China were ahead for most of the Group A encounter, but Hungary were never too far behind, and pounced on their opponents in the dying minutes to win 11-10.
World Championships silver medallists China took the lead and forged a 3-1 advantage after the first quarter.
They scored again early in the second period, but Hungary rallied to draw the quarter 4-4 and to go into the half-time break two down.
Hungary made ground on their opponents in the third quarter, edging the period 2-1 to set up a nailbiting finale.
An early goal levelled the scores at 10-10, before Hungary stole victory in the penultimate minute.
Gabriella Szucs and Rita Keszthelyi scored four and three goals for the Hungarians respectively.
Dora Czigany netted twice, while Barbara Bujka and Dora Csabai scored one each.
Sun Yujin, Sun Yating, Sun Hiuzi and Ma Huanhuan each scored a brace for China, with Gao Ao and Wang Yi also contributing single goals.