Midway through the first half, Aritz Aduriz's header from close range flew wide of the post.
Eventually, the deadlock was broken by the Basque side just before the break, as Aduriz rose highest inside the Colchoneros box before thumping his header into the bottom corner.
Five minutes after the restart, a marauding Costa rolled a cross towards Adrian Lopez, but his effort was deflected high of the crossbar. Koke delivered the resulting corner, but Costa's header was then blocked off the line.
It wasn't long before the away side found an equaliser, as Garcia fired an effort into the bottom corner in the 55th minute to make it 1-1 on the night.
Midway through the second half, Rico was able to find space inside the Atletico box before lashing a shot towards goal, but Thibaut Courtois was on hand to make a save.
The Belgian continued to deny the Basque side throughout the rest of the second half, which was mostly restricted to half-chances.
The away side then killed the tie off completely when, in the 86th minute, Costa was able to beat the offside trap before rounding Iago and converting from close range.
Diego Simeone's side will now face Real Madrid in the semi-finals.