Argentina were without captain Lionel Messi for the second consecutive match, with a foot injury sidelining the 97-cap veteran, but Pastore stepped up in his absence.
Pastore netted the winner 13 minutes into the second half to inspire Argentina, ending his 17-match international goal drought.
Argentina and Ecuador were level at the break after Miller Bolanos cancelled out Sergio Aguero's eighth-minute opener in the United States.
Gerardo Martino's Argentina have one more friendly fixture - against Bolivia on June 6 - remaining before the Copa America kicks off in Chile in June, while Ecuador face Panama (June 3 and 7) in a double-header ahead of the tournament's curtain-raiser on June 11.
Argentina fielded virtually an entire new starting XI, with 10 changes made to the team that defeated El Salvador 2-0 on Saturday, though Angel Di Maria retained his place.
Antonio Valencia, Arturo Mina and Jefferson Montero all made way for Ecuador as Gustavo Quinteros included Gabriel Achilier, Angel Mena and Renato Ibarra.
Argentina wasted no time asserting their dominance, with Aguero - unmarked at the back post - heading home Di Maria's corner from close range in the eighth minute for his 23rd goal in 60 appearances.
Marcos Rojo and Di Maria both came close to doubling Argentina's lead but Ecuador started to take control of proceedings from the 18th-minute mark after Mena's glancing header was dealt with by goalkeeper Sergio Romero.
The Ecuadorians continued to press forward in search of an equaliser and they were rewarded five minutes later thanks to Bolanos, who scored his first international goal after missing a penalty against Mexico last week.
Bolanos received a cross from out wide, which evaded two defenders, and his shot took a deflection before the ball went underneath Romero.
Argentina almost regained the lead five minutes before half-time, when Lucas Biglia's free-kick bobbled up off the ground and forced Alexander Dominguez to spoon the ball away for a corner.
The second half began frantically, with Argentina's pace causing Ecuador problems and it was not long before Martino's men hit the front again.
Pastore sprung the offside trap as Ecuador attempted to clear their lines and slotted the ball underneath Dominguez in the 58th minute.
Aguero had a golden chance to seal the victory for Argentina but the Manchester City star sliced his shot wide of the post with 18 minutes remaining.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1