Jose Peseiro's men looked to be heading for a second defeat in three games after Gonzalo Plata joined Ayrton Preciado on the scoresheet for Ecuador, those goals coming either side of Edson Castillo netting for Venezuela.
However, Hernandez headed in at the death in Rio de Janeiro to boost his side's hopes of progressing to the knockout stages of the tournament.
That allowed Venezuela to add to the point they earned when holding Colombia to a 0-0 draw.
Ecuador made a strong start, hitting the woodwork after just four minutes when Leonardo Campana met a Pervis Estupinan cross with a low shot that clipped the post.
Although clearly prioritising defensively solidity in the early stages, Venezuela showed its threat on the break when Cristian Casseres blasted over the bar.
The same man then went close with a lob that Pedro Ortiz did just enough to keep out and which would have been awarded by VAR, had it dropped in, despite an on-pitch offside call.
That early flurry of chances was not in keeping with a poor first half, but Ecuador livened things up before the break as Preciado bundled home in the 39th minute after a free-kick.
The excitement continued early in the second period as Castillo marked his first start for his country by levelling with a powerful header from Jose Martinez's right-wing cross in the 51st minute.
Venezuela almost moved into the lead with 20 minutes remaining as a Casseres corner somehow squeezed through to hit the base of the post before being desperately cleared.
But it was a counter from the subsequent corner that saw Ecuador go back in front in the 71st minute, Plata poking the ball home having first been denied at the end of a brilliant breakaway down the right.
Enner Valencia should have wrapped things up shortly after when he was played in behind, but his effort trickled wide of the far post with the goalkeeper stranded.
That miss was punished as the game headed into time added on, Hernandez meeting a superb pass in behind from Castillo to head the ball home and claim a point.