Hello, Alex. I feel I could understand your confused feeling about Japanese. I had never considered the difference of them until now.
The difference of the ending of those words indicates the time when it happened. I guess we use both of them when we give thanks.
You know ありがとうございます。means "thank you" and ありがとうございました。also means "thank you". But the latter shows something happened in the past therefore it is a past tense.
If someone did something for you in the past, even today, you could use it when you meet him or her again in another place after it has done or when you talk about the past thing with someone who did it for you.
In addition, it also has a meaning to say good bye. When you attend a party and you are about to leave the place, you can use it to a host of the party as a greeting, saying good by. Please don't say ありがとうございます。then. If you say so, it will show you are still going to stay there.
I really hope my answer won't make you more confused and let me say it just now. ありがとうございました for reading this .
There isn't any button to edit a sentence and to save it neither in this web site so that I have lost sentences which I wrote several times.