There are a few exceptions, such as in gen 2 for some of the kanto gym leaders(surge, sabrina, brock, blaine, and blue), but other than them, yes, all Gym Leaders give you a TM when you beat them.