I found the following formula which connects Euler's totient function with gcd at wikipedia.
$$ \gcd(a,b) = \sum_{k|a \; \hbox{and} \; k|b} \varphi(k). $$
The problem is that I can not figure out what exactly I am suppose to sum up (basically what $k|a$ and $k|b$ mean in this context).
It would be nice if someone can provide an explanation (may be with some examples).