James Tavernier's header saw Rangers edge into the Champions League play-offs where they will face PSV Eindhoven for the second successive season.
A header from the captain salvaged a 1-1 second-leg draw and a narrow 3-2 aggregate win over Servette after a hard-fought game in Switzerland.
Rangers' 2-1 lead from Ibrox was cancelled out by Dereck Kutesa's wonderful strike as Michael Beale's side struggled in the first half.
- How the teams lined up | Match stats
- Transfer Centre LIVE!
- Get Sky Sports | Get NOW to stream biggest moments
Danilo missed an unbelievable chance to equalise for the visitors, but they were much improved after the break and substitute Cyriel Dessers should have made the tie more comfortable.
The result sets Rangers up for a repeat of last year's play-off against PSV Eindhoven as the Scottish Premiership runners-up bid for a second consecutive campaign in the group stages.
How Rangers kept their Champions League hopes alive
Beale brought Connor Goldson and Ryan Jack back into the team after resting the pair for Saturday's league win over Livingston and the Gers manager changed his formation from the team's usual 4-3-3 to a midfield diamond spearheaded by Todd Cantwell. Danilo and Abdallah Sima started up front.
Rangers attacked in the early stages but Jose Cifuentes scuffed a left-footed effort from their first shooting chance.
The visitors were soon cut open by a slick move but Jack Butland made a brilliant stop at full stretch to deny Timothe Cognat.
The home side took the lead midway through the half. John Souttar came out second best from a challenge following a long ball and both Cifuentes and Tavernier were slow to react to the danger following a blocked shot. Kutesa had time and space to execute a glorious finish into the far top corner.
The unmarked Danilo had a brilliant chance to level on the half-hour mark but the Brazilian missed the target from inside the six-yard box following Cifuentes' deep cross.
Servette could have gone ahead in the tie when Souttar was caught trying to play offside as Kutesa ran onto a through-ball from just inside his own half.
The goalscorer forced a good stop from Butland from a tight angle but he had a team-mate completely unmarked in the middle.
Rangers maintained their formation at the start of the second half but they showed more urgency and both Nicolas Raskin and Cantwell had efforts saved before Tavernier got in front of his marker and headed home from close range after Borna Barisic whipped in a dangerous cross.
Rangers looked comfortable and Raskin was wide from a half-chance before substitute Dessers missed two good opportunities. The Nigeria international headed over and then hit the post from eight yards after being set up by Cantwell.
Servette managed to exert some late pressure but Rangers stood firm and the hosts missed two decent chances in quick succession in stoppage time.
Beale: We showed fantastic mentality
Rangers manager Michael Beale on BBC Scotland:
"We made a really slow start, we needed to dig in. At half-time we had to have some strong words as it wasn't what we were looking for.
"It was an excellent goal we scored. After that, we could've extended our lead. The team showed a fantastic mentality. I was pleased with the second half.
"We were too passive first half. Second half we were up the pitch, won more duels. We have to decide what team we're going to be. It shouldn't take to get to half time to do that."
On a "huge" play-off with PSV, Beale says Rangers will "have a right go" and "go hell for leather" at Ibrox next week.
Tavernier: We're still gelling as a team
Rangers captain James Tavernier spoke to BBC Scotland:
"The most important thing is we're through. We're disappointed not to get a clean sheet but we're happy to get to the next round.
"Second half I thought we were much better so I'm delighted we're through. We changed a few things at half-time and got around each other.
"Defensively we let them through us too easily. It's a new team, it's about gelling together and continuing to work hard. It's there but it's about being fully concentrated."
On next week's play-off first leg with PSV, he adds: "We have to put a real marker down at Ibrox."
Warburton: A few million reasons why win was vital
Former Ibrox manager Mark Warburton watched the game for Sky Sports News:
"A lot of credit to the manager and the players as they could quite easily have been 3-1 down at half-time such was the dominance of Servette.
"Cantwell, Raskin and Cifuentes looked very good second half, they controlled the ball well and there was more urgency about their play. They posed a threat and in the end were very comfortable winners.
"James Tavernier is a good footballer but he's a great athlete, never underestimate his quality. Even talking to the younger players, the influence he has on the dressing room is very apparent so he deserves enormous credit.
"There are a few million reasons why it was important tonight, the financial implications of not going through are so critical to Rangers in terms of closing the gap on Celtic.
"PSV will be a very tough test, they were strong winners against Sturm Graz, but if they get through that to the group stages it's another £20m and. when you think what you actually win in Scotland for the title, it's a huge chunk of change."
What's next?
Rangers' attention turns to the Scottish League Cup with a tie against Championship side Morton on Saturday.
They will then face PSV Eindhoven in their Champions League play-off, with the first leg at Ibrox on August 22.
Their next Scottish Premiership match is away to Ross County on August 26, live on Sky Sports; kick-off 12.30pm.