When moving mailboxes between servers - I have used ImapCopy ( http://www.ardiehl.de/imapcopy/ ) and found it easy and straightforward to use. Not sure if it does Gmail to Imap, but it certainly does Imap to Imap.
copying mail between accounts with your email client (outlook or other ) is the easiest way. add your web account to the client and copy email to server.
evolution email client also has a pst import plugin…