The Seagulls twice had to come from behind after they first conceded with just a minute on the clock when John Akinde netted.
Inigo Calderon and Glenn Murray looked as though they had restored normal service with goals before the break, but the Daggers went back ahead through Jon Nurse and a Danny Green penalty.
Brighton knew victory would seal their promotion to the second tier, with third-placed Huddersfield not in action, and they rallied impressively with late goals from Liam Bridcutt and Ashley Barnes.
It moved them 16 points clear of second-placed Southampton who were stunned by in-form Rochdale 2-0 at Spotland.