Yes. First go to gmail and select the IMAP functionality. Read the gmail help for the server info you'll need to set up Mail.app. Then create a new mail account, select IMAP and plug in all the settings in the right places. There is no way to convert a POP account to IMAP in Mail.app.