The result left Palace 12th in the standings on 16 points from 14 games while Leeds moved two places up to 15th on 15 points after they ground out their third league win of the season.
Those misses proved costly for the visitors after the ball hit Guehi's outstretched arm deep into stoppage time, with Raphinha making no mistake with the penalty to delight the home fans at Elland Road.
Palace manager Patrick Vieira was disappointed.
"I'm frustrated because we were the better team and when you don't put away your chances, you know you can get punished," the former France midfielder told the BBC.
"We just have to accept the result. Some of the games have gone in our favour, tonight it didn't. We don't have time to feel sorry for ourselves."
Leeds midfielder Kalvin Phillips was relieved after they ground out the win and dismissed reports that he had fallen out with manager Marcelo Bielsa.
"It is a massive win for us, we are very happy and have to try and go on a run of games now - we have a tough run of games before Christmas," said the England enforcer.
"I will play any position the manager asks me -- if he wants me to play centre back I will play centre back, if he wants me to play goalkeeper I'll play goalkeeper.
"I saw a lot of things on social media and TV that me and the manager had fallen out, it's never been the case and I wanted to put that to bed."