Gmail will scan files sent as attachments in order to prevent any malware from spreading so it's basically safe to open attachment files in Gmail.