Wilfried Zaha continued his incredible scoring record against Brighton with a 19th-minute penalty, after Tariq Lamptey fouled Michy Batshuayi.
It was his seventh goal in all competitions against the Seagulls, the most he has scored versus any opponent.
Batshuayi had a 52nd-minute effort ruled out as the Eagles looked to double their advantage.
But in a dramatic finish, Mac Allister drilled in a deflected effort from the edge of the penalty area in the 90th minute for his first Premier League goal.
Brighton captain Lewis Dunk was then sent off in stoppage time for a foul on Gary Cahill.
Palace remain in 12th on seven points, three more than Brighton, who drop to 16th.
Budweiser King of the Match: Wilfried Zaha
Crystal Palace: 24 Oct v Fulham (A)
Brighton: 26 Oct v West Brom (H)