© Getty Images
© Getty Images
It looked like the La Liga leaders had been handed a lifeline at the start of the second half as they were awarded a penalty when Sapunaru brought down Raul Garcia.
However, Herrera correctly read David Villa's straight-down-the-middle spot kick, keeping Elche on level terms.
The visitors were let off the hook again just seven minutes later when Villa headed past the keeper, only to see the offside flag raised against him.
As tensions started to rise between the two sides, Atletico continued to create the majority of the chances, but the visitors looked dangerous on the counter-attack.
The deadlock was finally broken in the 72nd minute when Miranda picked out the top corner with a header from a Jose Sosa corner.
Elche had a half-chance to get back on level terms just five minutes later, but Carlos Sanchez's header went straight into the arms of Courtois.
Sanchez looked to set up a chance shortly after, crossing the ball in for Alberto Botia, but he could not find the target.
The hosts were able to put the result beyond doubt in injury time when they were awarded their second penalty of the match.
This time Costa stepped up to take the spot kick and managed to beat the keeper to make sure of the win, while Sapunaru was sent off, having been booked for the second time for giving away the penalty.
The result leaves Atletico six points clear of Real Madrid, but having played one game more.