The Americans outshot China 17-3 and had nearly twice as much possession, but had to rally after Shen Lili gave the Asians the lead in the 19th. She converted a cross from Han Jiayuan, scoring from 15 meters to put the Chinese ahead.
The Americans equalized in the 36th when Kealia Ohai raced down the left to the end line and crossed into Hayes, who used a right-footed touch to beat Chinese keeper Shen Li.
It was the fourth goal of the tournament for Hayes, who had three in the United States' opening 4-0 win over Ghana.
The result left the United States in second place in Group D with four points, two behind Germany which defeated Ghana 1-0 earlier Thursday, and three ahead of China. Ghana is last with zero points. Only two from each of the groups advances to the quarterfinals.
The United States will need a win or a draw against Germany in its final group game on Monday to assure itself of advancing.