Torah is an all encompassing term for the teachings of Judaism.
Tanakh is actually more than the 5 books of Moshe.
Tanakh is an acronym for Torah, Navi, and Ketuvim. Torah is the Chumash {Five books} which we received at Mount Sinai. This is also known as the Written Torah.
Navi are the prophetic writings. This includes Joshua, Judges, Isaiah, Ezekial, etc.
And then the Ketuvim are things like Psalms, Song of Songs, Proverbs, Job, etc.
In Pirkie Avos this Mishnah is referring to both the Written Torah and the Oral Torah and all of Tanakh.
muman613
http://www.aish.com/literacy/concepts/What_Is_Torah$.asp
No word in the Jewish religion is so indefinable and yet so indispensable as the word Torah. Torah is the most comprehensive term for the substance of Judaism. Torah is Teaching. Torah is Law. No one can hope to achieve even a minimal appreciation of the Jewish religion without learning, and then reflecting on, the idea of Torah and its place in the life of the Jew.
http://www.askmoses.com/article/326,108/What-is-Tanach.html
______ _______ __ __ _______ ______ ___ ______
| __ | |. __ | \ \ / / |_____ | |____ | |_ | | __ |
| | | | | | | | | V / _ | | | | | | | | | |
_| | | | | | _| | | |\ \ | | | | | | | | _| | | |
|___| |_| |_||___| |_| \_\ |_| |_| |_| |_| |___| |_|