Aguero joined Barcelona in the summer after leaving Manchester City but had been sidelined by injury.
He came on with three minutes to go, shortly after Coutinho had made sure of Barcelona’s win.
The former Liverpool forward struck from close range to add to goals from Ansu Fati and Memphis Depay.
Jose Gaya had given the visitors an early lead but Fati marked his first start in almost a year with a goal soon after, firing home from the edge of the box.
Fati was then fouled inside the box and Depay stepped up to convert the penalty.
As Valencia pushed for an equaliser Coutinho scored for the first time since a 4-0 win against Osasuna in November 2020 to secure the win.
Barcelona are on 15 points, five behind leaders Real Sociedad.