Wilfried Zaha scored twice and James Tomkins once as the Eagles produced some scintillating attacking football before the break, although defensive lapses allowed Glenn Murray and Jose Izquierdo to score for Brighton.
The Seagulls then took the initiative in the second half but Palace held on to move six points clear of the bottom three.
“We died a few deaths there in the last 15 minutes in particular, especially after doing so well in the first half," Hodgson told Palace TV.
"I thought the team played ever so well and we were obviously disappointed that we didn’t have a better margin to build our second half upon because of the two goals they got back on us, but it’s good to know that the team can hold on."
“It’s nice to go into the dressing room after the game knowing that it could have gone pear shaped for us if we’d conceded that equaliser, but we didn’t," said the 70-year-old.
"There have been so many occasions that I’ve sat here and listened to people sympathising with our plight saying that we deserved better.
"On this occasion the late goal didn’t kill us and we got the three points that we so badly needed, and gave our fans a wonderful game of football to watch and hopefully go home happy.”
Palace are now just one point behind rivals Brighton and a favourable run-in should allow them to extend their Premier League stay to six seasons.