Barry scored the winning goal after Martin Laursen’s opener had been cancelled out by Thomas Vermaelen.
With games to come against Hamburg and Slavia Prague, England midfielder Barry admitted it was essential Villa got off to a good start and he believed the hosts were worthy winners.
Barry said: “It was very close. In the first half they had possession but in the second we changed our game plan.
“We deserved the win. We knew they were going to have a lot of possession but it’s the scoreline counts. It was important we started with a win at home. It sets us up nicely.”
Villa boss Martin O’Neill said:
“I thought we were brilliant, I thought we deserved to win the game.
“We’ve got good players as well; I thought we were magnificent.
“We should have had a penalty — it was clear-cut and both the referee and the linesman missed — and that would have given us a wee bit more comfort.
“For the first match of the group stage it was magnificent.”
Ajax started strongly, passing superbly and pushing Villa back, but they failed to really create anything.
When Villa suddenly kicked into life and forced a corner, Ashley Young’s excellent delivery was powerfully headed in by Laursen, who got to the ball ahead of stranded keeper Kenneth Vermeer.
The goal boosted Villa and there was now far more bite to their tackle and zip about their passes.
But, as Ajax had earlier, Villa could not fashion clear chances and were caught by a replica of the sucker punch they delivered to the Dutch side.
Emanuelson swung in a corner and the unmarked Vermaelen thumped home a header off the crossbar.
It was through left winger Young the hosts gained the upper hand when he cut the ball back for Barry to clip into the bottom corner from 15 yards.
Only a decent double save by Vermeer kept Villa from scoring again — even though the keeper did almost carry Laursen’s header over the goal-line.
Villa were almost caught out when an Ajax break ended in a well-struck Emanuelson short that forced Brad Friedel into a smart save. The hosts survived but did suffer a late blow as Agbonlahor was stretchered off after clashing with Vermeer.
ASTON VILLA: Friedel, Luke Young, Cuellar, Laursen, Shorey, Reo-Coker (Gardner 81), Petrov, Barry, Milner, Agbonlahor (Davies 90), Ashley Young. AJAX: Vermeer, Silva, Oleguer (Van Der Wiel 78), Vermaelen, Emanuelson, Lindgren, Sarpong (Cvitanich 55), Vertonghen, Suarez (Leonardo 60), Huntelaar, Gabri.
Referee: Thomas Einwaller (Austria).