The goal helped wrap up a win in the first leg of the last-16 clash against the Spanish third-division side after defender Diego Godin and Costa's fellow former Chelsea striker Fernando Torres gave them a two-goal half-time lead.
That was Costa's first competitive goal for Atletico since he scored a penalty in their 3-1 victory over Chelsea in the Champions League back in April 2014.
But it nearly threatened to ruin his second debut after he injured his knee over-stretching to bag the third goal.
Vietto, who failed to score in 10 games this season for Atletico, had found himself relegated down the pecking order there after Diego Costa's return to the club from Chelsea.
The 29-year-old told reporters: "I am very happy for having once again felt like a footballer and for having played with Atletico Madrid again".
NY bombing suspect pleads not guilty
A NY man pleaded not guilty Thursday to trying to bomb a subway station, an attack that injured no one seriously but himself. According to court documents, Ullah made a taunting Facebook post directed at President Donald Trump before the attack.
Costa has had a frustrating few months in the wilderness due to Atletico's transfer ban which meant the Spaniard was unable to register for the La Liga outfit until January 1.
However, Costa suffered a knock in the process after his knee was accidently stood on in the process of scoring and Atleti confirmed via a statement that he will be assessed again.
"I can't ask for more in this second debut for Atletico".
"His departure annoys me because his play hasn't been accompanied by goals at a team which doesn't wait. The team did well in a tough game, which is what makes me happiest".
The second leg of the tie against third-tier club holds next Tuesday, with Atletico hosting Getafe in the league this Saturday.