Gammoudi first came to international attention at the 1963 Mediterranean Games in Naples, where he won the 5,000 m and 10,000 m. and repeated the feat in the 1967 Games. Despite those achievements, Gammoudi was still virtually unknown when he arrived at the Tokyo Olympic Games. The favourite, world record holder Ron Clarke from Australia, ensured a fast tempo throughout the race. With one lap remaining, Clarke had dropped all his main rivals, except Gammoudi and Billy Mills from United States. Coming into the home straight, Mills, Clark and Gammoudi exchanged leads. With 50 m to go, Gammoudi had the lead, until Mills swept past Gammoudi to win the gold medal. Two days later, Gammoudi won his heat in the 5000 m, but for reasons never fully explained, he withdrew from the final.
Gammoudi successfully defended his 5000 m and 10 000 m titles at the Mediterranean Games in Tunis in the 1967, and was one of the favourites at the Mexico Olympics. In the 10,000 m final in Mexico, Gammoudi was in the leading group throughout the race. The group had been reduced to three by the bell lap. Naftali Temu from Kenya, who won in 29:27.4 and Mamo Wolde from Ethiopia 29:28, sprinted the last lap, outrunning Gammoudi, leaving him at 29:34, with the bronze medal. Two days later, Gammoudi qualified for the 5000 m final. In the final, three runners were in contention at the bell lap, with Gammoudi leading Temu and another Kenyan, Kip Keino. The last lap was fast pace, and although the two Kenyans gave charge, Gammoudi held on to the lead, winning the gold medal.
At the next Mediterranean Games, at İzmir in 1971, Gammoudi's won the silver in the 5000 m. Despite his disappointing performance at Izmir, Gammoudi was one of the favourites in the impressive 5,000 m and 10,000 m fields at the Munich Olympics. In the 10 000 m final, a tightly bunched group of nine runners were traveling at sub-world record pace just before the 4600 m mark, when Lasse Virén from Finland suddenly stumbled and fell over, causing Gammoudi to tumble over the top of him. Virén recovered quickly and went on to win the race, but Gammoudi took much longer getting to his feet, and after running for a lap and a half to close the 100 m gap that had opened between himself and the leaders, he dropped out. In contrast to the 10,000 m pace, the early stages of the 5000 m final were run at a very slow pace, with Gammoudi prominent in the pack that remained tightly bunched for the first 3000 m. The pace picked up considerably in the last 2000 m, with Virén and United States champion Steve Prefontaine separating from the pack. The last mile turned into an all out sprint, with Virén beating Gammoudi by about ten meters, in the latter's last major competitive race.