To delete your all Gmail messages on the iPad Mail app, open Settings > Passwords & Accounts. Select your Gmail account and choose Account > Advanced > Delete Mailbox and make sure the Trash folder is selected.
Then, open the Mail app and go to your Inbox folder. Tap on Edit and select all the emails to delete. When finished, tap on Delete.