The Brazilian’s spot-kick in the third minute of added time, after Palace defender Marc Guehi had handled, raised the roof at Elland Road and secured Leeds just their third league win of the season.
It was a dramatic finale to what appeared to be another frustrating night for Marcelo Bielsa’s side, who could have been on the end of a defeat had Palace substitute Christian Benteke not headed a golden second-half chance wide.
Leeds’ victory lifted them five points clear of the relegation zone and sent Palace spinning to back-to-back league defeats for the first time under boss Patrick Vieira.
The first half fizzled out after a promising start, with both sides losing their way down cul-de-sacs each time they worked the ball into the final third.
Leeds tore into their opponents from the off in pursuit of a galvanising victory, but Palace stood firm under the early onslaught and helped set a frantic tempo.
Adam Forshaw fired narrowly wide from the edge of the penalty area in the 15th minute and Jeffrey Schlupp went just as close for Palace with a similar effort soon after.
Kalvin Phillips, restored to his favoured midfield holding role, burst through two challenges on to the edge of the area, but blazed high and wide.
Bielsa made two changes at the interval, sending on Rodrigo and Junior Firpo for Mateusz Klich and Pascal Struijk.
Firpo’s first contribution was to mis-place a pass and then concede a free-kick as Jordan Ayew scampered clear, but Conor Gallagher’s free-kick hit the wall and Wilfried Zaha miscued the rebound.
Leeds responded with their best move of the match. Raphinha’s brilliant cross-field ball picked out Dan James and the Wales forward’s pass into the area was pushed wide by Rodrigo.
The home crowd turned up the volume as Leeds began to build momentum, but clear-cut chances continued to elude them.
Forshaw rifled over at the end of one period of sustained pressure, while Palace remained a threat, with Zaha and Ayew the targets as they looked to hit Leeds on the counter.
Palace boss Vieira sensed the points were very much up for grabs when he sent on Benteke for Odsonne Edouard in the 67th minute.
The Belgium striker was then guilty of squandering the best chance of the match so far when heading Gallagher’s cross wide at the back post seven minutes later.
Leeds forced three successive corners, all scrambled clear, and Benteke went close to breaking the deadlock again when stretching on to Ayew’s speculative cross, only for Leeds goalkeeper Illan Meslier to snaffle the ball on the goalline.
Tyler Roberts’ curling effort was easily saved by Palace goalkeeper Vicente Guaita before another Raphinha corner led to the decisive penalty.
Referee Kevin Friend checked the pitch-side monitor after Cooper’s header struck Guehi’s raised hand and Raphinha converted the spot-kick in the third minute of added time.