How to make a local tar file of a remote directory
You got it almost right, just run the tar on the remote host instead of locally. The command should look something like the following:
ssh remote_host tar cvfz - -T /directory/allfiles.txt > remote_files.tar.gz