One very common approach is to catch HTTP Errors for all API requests you make. If you run into a 401 error it means the access token is not valid any more and you can try to refresh it and repeat the original request. If the token refresh fails it most likely means that the user has revoked access for your app.
In pseudo code:
result = makeApiRequest();
if (result.status == 401) {
refreshToken();
result = makeApiRequest();
}
Some of the Google APIs client libraries (for example the one for Python) will take care of that for you automatically, but unfortunately not all of them.