Step 1: Firstly you need to enable to IMAP option in Gmail Account setting.
Step 2: Now Turn on "Access for less secure apps". You can go with this URL: https://www.google.com/settings/security/lesssecureapps
Step 3: Run Gmail Backup Tool and enter your Gmail credentails.
Step 4: Check all folders/ custom folders and number of messages and hit "Next" button to go next steps.
Step 5: Now, choose required export option and browse "Output Directory". After that, click on "Process now" button to finish the backup process.