@Anonymous Thank you for reaching out to Microsoft Q&A. Sorry for the delay in response.
As per docs: Add Google information to your application and message you saw in the portal, you would need to define scopes in Provider's registration portal (Google) and App Service or Functions can request scope at login time. Meaning you don't need to add scope in Functions app (or App Service). Please follow the docs and validate and if you have any questions, feel free to reach out. Correct me if my understanding is incorrect.
Based on endpoint: https://gmail.googleapis.com/gmail/v1/users/me/messages you shared, you need any of the following scopes for list operation according to Gmail API - List (also refer Gmail API - Get) and I saw you appear to have gmail.modify
scope. Since the request is failing directly from POSTMAN to Google API(s), I would recommend you reach out to Provider (Google) for the failure.
I hope this answers your question and if you face any issue from Azure Functions app, please share the details. I would be happy to assist you.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community.