You do need to have the vaccination, but the travel agent is also partially right! The confusion is because there are two separate requirements here: the need for a vaccination certificate to show at the border, and the need for the individual to be protected against the disease.
Yellow fever is the only disease in the world currently covered by International Health Regulations (IHRs), and for which an official ‘Certificate of Vaccination’ can be issued. According to IHRs, travellers entering the Gambia by flying directly from the UK or Europe do not need to show a valid certificate of vaccination against yellow fever. However, the Gambia does have the yellow fever disease present in the whole of the country, so travellers still need to be protected against this mosquito-borne disease, which is very serious and can be fatal. Many travel agents only pass on the official mandatory requirements for vaccinations (ie, the need for a certificate), so may not tell you about the non-mandatory (but nevertheless recommended) vaccinations.
So get the yellow fever vaccination before visiting the Gambia – you will be issued an official certificate once you are vaccinated. You won’t need the certificate to get into the Gambia, but you will be protected against this horrible disease. The certificate lasts for 10 years, so you can then visit any countries where yellow fever is present, including those that require a certificate to be shown at the border. One example of this is when travelling from Peru into Bolivia.