Yes, you can transfer emails from Mac OLM file into Gmail using Mac Outlook. First of all setup your targeted Gmail account in your Mac Outlook.
Now, got File and Hit Import option.
You will be asked to import OLM file. Browse and import this .olm file into Mac Outlook.
Please Note: The OLM mailbox folders may import under "On My Computer" section. So you have to drag and drop or move yoru OLM folders to Primary folder section to sync with Gmail account.
This is quite workable method to import OLM to Gmail account.
If it doesn't, you can switch to third party tools to upload .olm file data into Google Mail like Advik OLM to Gmail Converter. This tool will transfer email folders from Mac OLM file into Gmail directly.
Source: https://www.viskytech.com/2021/01/04/import-olm-to-gmail-manually/