Albion are level with the Pirates at the break despite Glenn Murray having the ball in the net which was ruled out for offside.
Aaron Connolly, aged just 19 and making his full debut, netted on 55 minutes to open the scoring. Arron Mooy, also making his first start for Brighton, won the ball in midfield and played in Jahanbakhsh. His shot was deflected and Connolly, who has been in prolific form for the under-23s, was at the back post to tap home.
In stoppage time Albion went back ahead when Bernardo played the ball to Steven Alzate who fizzed the ball across and captain for the night Glenn Murray tapped home to make it 2-1.
Carabao Cup / Connolly and Murray strike as Brighton see-off Bristol Rovers
The Rovers levelled the scores through Tom Nichols fine half volley but Albion, who made 11 changes from the Premier League loss against Southampton last Saturday, kept pushing forward. They got their reward in the final minutes as Steven Alzate teed-up 35-year-old Glenn Murray and the captain for the night made no mistake from close range.
Bristol Rovers 1-2 Brighton & Hove Albion RECAP: Report and reaction as Gas suffer injury time agony
Albion: Button; Balogun, Webster, Bong; Alzate, Mooy, Gross, Bernardo; Jahanbakhsh, Connolly, Murray. Subs: Steele, Baluta, Ahannach, Sanders, Cochrane, A.Davies, Roberts.