Two goals from Villa striker Andreas Weimann put the home side in control early in the second period.
Ferguson said: "It reminded us of a cup game here a few years ago when we were 2-0 down. I think Van Nistelrooy scored a couple and we won 3-2.
"We were disappointed with the first-half performance, it has to be said.
"You had to give credit to Aston Villa, they never gave us a minute's peace on the ball.
"When they got the second goal we were up against it, but once we scored our first goal, you always felt they were going to do it."
Hernandez has now netted seven times in the last five games.
Ferguson said: "I've been saying it for weeks, that he's such a great professional. He doesn't complain. We do prefer that one striker with one playing behind.
"It didn't work in the first half but when Javier came on and Robin dropped a bit deeper, and Wayne went out to the left-hand side, you had a feeling that if we got a goal we would go on and win it."