Let me trace gcd(, ):
Call : gcd(, ) , so call gcd(, )
Call : gcd(, ) , so call gcd(, )
Call : gcd(, ) , so call gcd(, )
Call : gcd(, ) hits base case (), returns The GCD of and is . Notice how quickly the numbers shrink. This is why Euclid's algorithm is so efficient.