This Google Script will help you download your email messages from Gmail to your Google Drive in the EML format.
Nice little snippet from Amit Agarwal for generating .eml files from Gmail messages using Google Apps Script. The post has all the code you need for this.