A delay of game penalty followed by a pass for 12 yards put the ball at the 44 with 2 seconds left in the half.
Hill caught Alex Smith's pass just shy of the 40-yard line and briefly paused to size up the Dallas defense, which was dropped back near the 15-yard line.
Jones compounded the gaffe by the defense with an unsportsmanlike conduct penalty after the play. The Chiefs responded on the next series with an dazzling 56-yard touchdown reception from wide receiver Tyreek Hill.
But momentum started to swing in the Chiefs' favor.
It was character showing time for the Cowboys and, led by Prescott, they didn't blink.
Elliott gained 16 yards on five carries on the drive, none bigger than a 2-yard pickup on third-and-1 from the Kansas City 9 one play before Beasley's touchdown catch. Prescott completed just one pass on the drive, but he ran twice for 17 yards, including a key 4-yard gain on third-and-3 two plays before Elliott's score.
The Cowboys now lead the Chiefs 21-17. Williams had receptions of 27 and 51 yards as he recorded the third 100-yard game of his career, and his first since catching nine for 173 yards in the final game of the 2015 season.