Magento2: Overriding the catalog widget
You have to just rename your theme module directory like Magento_CatalogWidget
.
New file path for your theme:
mytheme/Magento_CatalogWidget/templates/product/widget/content/grid.phtml
When core module name with -
you have to remove that and make the next character Uppercase.
Eg.:
if you want to override core module module-catalog-inventory
then your path would be Magento_CatalogInventory
.