Welcome to Android Central! Which phone? Are you using the stock Gallery app, or the Google Photos app?
If the photo is in the cloud (in your Google Photos on the web), you can't delete it using the stock Gallery app. You have to use the Google Photos app to delete cloud photos.