The Portuguese side made sure that qualification for the next round remains possible with Wednesday's win at Stade Constant Vanden Stock, but they made it difficult for themselves.
Chancel Mbemba gave the hosts the lead in the 18th minute before Nemanja Matic and Gaitan struck either side of half-time to give Benfica the lead.
Massimo Bruno looked to have stolen a point with 14 minutes left and in the process saw Benfica heading out of the competition, but substitute Rodrigo grabbed the winner in stoppage time to take them level on points with second-placed Olympiacos.
"It was very important to win and I think the two teams played to win," the Argentinian said. "We played very well and this is the most important. Luckily Rodrigo gave us the three points.
"We believe we can qualify despite depending on others. Now the only problem is depending on others, but we want to progress."
Matic added that Benfica will do everything to beat Paris Saint-Germain at Estadio Da Luz on matchday six, but admitted they will need luck on their side if they are to stand any chance of progression.
"It was another goal," he began. "But the most important thing is that our team won the game. Now we will give everything to win the last game and we will see how the match between Anderlecht and Olympiacos goes.
"With a little luck we could pass go through."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.