It was a first half almost reminiscent of a training ground drill as Cameroon's attack repeatedly went up against Gambia's defence, but the latter stood firm and it was goalless at half time.
Early into the second half however, Toni Conceicao's team did make the breakthrough, via a brace from Toko Ekambi in quick succession, giving them a lead that they held onto until the end of the game.
It means that the hosts will march on into the last four of the competition, with their eyes now firmly set on going all the way and lifting the continent's biggest prize.
Story of the Match
Cameroon entered the game as the favourites, being the higher-ranked team, as well as the host country, but Gambia's incredible underdog story so far meant it would be a risk to count them out too soon.
As has been the case for many games at this edition of the AFCON, the extremely humid weather conditions no doubt contributed to the more passive passages of play early on, though credit must be given to the fans in the crowd who created an excellent atmosphere throughout.
It was The Indomitable Lions that controlled most of the possession in the opening 10 minutes, as they attempted to work their way around a well-organised Gambia defence, but it took some time before they posed a real threat.
Eventually, after a period of sustained pressure, Cameroon did win the first corner of the match, but it was cleared away, and they were forced to continue their patient build-up play.
Vincent Aboubacar got the first shot off of a Moumi Ngamaleu cross from the right hand side, but his attempted flick towards goal ended up going over the crossbar from close range.
The aforementioned striker used his strength to force Noah Sonko-Sundberg into the first yellow card, as he struggled to stop the tournament's top scorer from racing down the left wing.
In the 26th minute, Nouhou Too found himself with space in front of him as he dribbled into the box, but his resulting shot was tame and didn't trouble Baboucarr Gaye in the opposition net.
A couple of minutes later, Collins Fai tricked half the stadium into thinking he had put his side ahead, when he unleashed a powerful strike from long range, but to his and many fans' disappointment, it hit the side netting.
The quality of chances continued to increase as Aboubacar got his head on another cross, only to see his effort fly just wide of the post, but it certainly felt as though Toni Conceicao's side were getting closer.
They came closer still when Aboubacar once again headed on target from barely a few yards out, but some excellent goalkeeping from Gaye prevented him from finding the back of the net.
Another yellow card for Gambia went against the goalkeeper, for some time wasting which had already been a repeat offence, despite it not even being half time.
Cameroon continued to push up the pitch, but thanks to some resolute defensive structure, Gambia held out and the teams went in goalless at the break.
Pretty soon after the interval though, that resistance broke down, as Karl Toko Ekambi headed home from a Martin Hongla cross, which produced a feeling of relief as much as anything else among the hosts' fans.
That led to a slight switch in terms of the pattern of the game, with Cameroon happier to yield more possession to their opponents, who were now forced to come out more than they had been previously.
Gambia also then made a trio of attacking changes which, as many football fans will tell you, usually inevitably results in less defensive solidity, which was shown when Ekambi got his second moments later.
The striker tapped the ball home at the back post following a ball across goal from Hongla once again, and the mood in the stadium turned from optimistic to ecstatic.
Following that quickfire double, the game's tempo subsided once more, with both sides seemingly aware that the result, while there was in theory still time, was effectively decided already.
Tom Saintfiet's side looked fatigued and dispirited from that point onwards, simply trying to limit any further damage and ensure they went out with their heads held high.
Cameroon continued to look for a third, albeit without nearly as much urgency as they had been previously, exploiting Gambian full backs who were run ragged down their respective sides throughout the 90 minutes.
The match turned into a fairly stop-start affair by the 80th minute, with various substitutions and free kicks not allowing many continuous periods of attack to take place whatsoever.
There was time for one final big opportunity for Cameroon, as Clinton N'Jie was played in over the top, only for his attempted chip to be blocked by Gaye, with the rebound then blasted over the bar by Aboubacar.
That summed up the majority of a game which was, in truth, not of the highest quality by any stretch of the imagination, and after three more minutes of added time, the referee blew the final whistle to bring the first AFCON 2021 quarter final to an end.
Gambia therefore exit the competition at this stage, though nearly nobody would have expected them to get this far, considering they began their AFCON journey in the preliminary rounds of qualifying, so they have done their country proud.
Meanwhile for the host nation, it's another step towards next Sunday's final and potential glory, though they will have to get past one of Egypt or Morocco in the semi final on Thursday first in what is sure to be a brilliant game.
Gambia (4-4-2): Gaye (GK); Sonko-Sundberg (Ceesay 85'), Gomez, Jagne [C] (Mo. Barrow 56'); Touray, Bobb, Marreh (B. Jobe 83'), Janko (E. Darboe 56'); Badamosi (Colley 56'), Mu. Barrow
Unused Subs: M. Jobe (GK), Ngum, Sohna, Mbye, D. Darboe, Sanneh, Adams
Cameroon (3-5-2): Onana (GK); Castelletto, Ngadeu, Tolo; Fai (Mbaizo 84'), Hongla (Kunde 81'), Anguissa, Oum Gouet, Ngamaleu (Bassogog 87'); Toko Ekambi (N'Jie 81'), Aboubakar [C]
Unused Subs: Efala (GK), Oyongo, Choupo-Moting, Epassy (GK), Ganago, Onguene, Lea Siliki, Neyou
Goals: Toko Ekambi (50', 57')