A grammar guru might answer as to WHY, but in my experience, they mean the same and are fine. I think it just depends on how formal you want to sound. You could even say "Thanks for dinner and the gifts". I would not SAY (verbal communication) "Thanks for dinner and gifts", though I think it would and could be used as a quick note on a thank you card. The most formal response, in my opinion is to not use contractions and to use the articles. So: Thank you for the dinner and the gifts" to me is most formal.