Talismanic striker Costa scored the second on Sunday to re-establish a three-point lead over city rivals Real at the summit, but he paid the price for his bravery in sliding home from close range to wrap up the victory.
The 25-year-old - who has only just returned from a hamstring strain - collided with the post in the act of scoring, appearing to take a heavy blow to his leg, and was carried off on a stretcher in clear discomfort.
With the extent of the injury sure to be a concern for coach Diego Simeone at such a pivotal stage of the season, that setback took the gloss off a battling performance that had capped off a remarkable week.
The league leaders secured a UEFA Champions League semi-final berth on Wednesday by beating Barcelona and they avoided a European hangover when Diego Godin headed them into a first-half lead.
Costa's goal came after he had already missed from the penalty spot, with Angel Lafita's red card compounding a difficult game for Cosmin Contra's relegation-threatened Getafe side.
Following the victory against Gerardo Martino's Barca, Simeone had demanded full focus from his side - but despite that, Atletico seemed lacklustre in the early stages.
Alexis almost put the hosts ahead in the 19th minute, only to head Pedro Leon's corner agonisingly wide.
That let-off seemed to jolt Atletico into action, though.
After 28 minutes, Godin spurned a glorious chance as he rose to meet Koke's right-wing free-kick but nodded the ball straight at Jordi Codina in the Getafe goal.
Godin was not denied next time, however.
The Uruguayan out-jumped Roberto Lago at the back post in the 40th minute, looping a powerful headed effort over Codina following Juanfran's lofted cross-field pass.
Getafe started the second half with renewed determination and they were almost rewarded with an equaliser, but the unmarked Juan Rodriguez could only head Leon's right-wing cross straight at Thibaut Courtois before the home side were the architects of their own downfall in the 64th minute.
Lafita hauled down centre-back Miranda inside the area and was shown a straight red card, but Atletico could not capitalise as Costa saw his spot-kick saved by Codina.
The frustrated Costa finally doubled Atletico's lead in the 84th minute, as he tapped Adrian Lopez's pass in at the back post, but the Spain international suffered a nasty leg injury as he collided with the frame of the goal, with a gash visible just below his knee as he received treatment.
With several of his team-mates signalling to the bench, he was soon carried off on a stretcher, and Atletico played out the final few minutes with little more action of note.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.