どちらも丁寧ですが、「ありがとうございます」の方がより汎用的です。
「ありがとうございます」は話し言葉にも書き言葉にも使いますが、「感謝します」は書き言葉かスピーチにしか使わないと思います。
I think both are polite. But 「ありがとうございます」 is more common.
You can use 「ありがとうございます」 whenever you speak and write.
On the other hand, I use 「感謝します」 or 「感謝申し上げます(感謝いたします)」 only for business letter or speech.