Welcome to BYC!
There are different schools of thought when it comes to a rooster showing aggression - some that address rehabilitation and others that address removal. There are a few things that may factor into which approach would be appropriate for your situation. What breed is your bird? How long has the aggression been going on? What have you done in response thus far? Do you enter the coop at other times without getting a response or is egg gathering the only time you go into the coop so that is why you associate that as the stimulus that results in the attack?
Greetings from Kansas, bigvern, and ! Great to have you aboard but sorry about your cantankerous rooster! A lot of folks would advise you to eat him, re-home him, or re-educate him. The first two are self-explanatory. The last one can take many forms. He clearly thinks he is top dog. He may be of the flock but you are of the farm. One thing I've done is grab the rooster and subdue him, then pick him up and carry him around under one arm. He will protest but it shows him he can't always have his way - that it's my will, not his. Sometimes it takes a few trials before he gets it. You could also carry a broom and give him a gentle swat on the rear. Good luck with whatever you decide. Here's a link that discusses mean roosters: https://www.backyardchickens.com/newsearch?search=Mean+rooster
And if you want to chat with your poultry owning neighbors, find the GA thread in this link: https://www.backyardchickens.com/f/26/where-am-i-where-are-you
Welcome to BYC and the coop! There's a lot of great peeps here! Feel free to ask lots of questions. But most of all, make yourself at home. I'm so glad you decided to join the BYC family. I look forward to seeing you around BYC. Good luck with your rooster.