I think you need to change the security settings ('Tools'->'Internet Options'->'Security' tab) so that this warning does not get displayed. If you are just looking to access Gmail why not use one of the Gmail modules?
Martin
Comment on Re: Handling Pop up windows using Win32::IEAutomation