Councillor Tahir Malik said he regretted his actions and that resignation was the “best thing” he could do for the town.
Pictures circulating on social media last month showed him at a gathering at a house in Luton, along with councillors Asif Masood and Waheed Akbar- forcing them all to apologise.
Mr Malik was seen chatting with guests less than two metres apart with a mask hanging below his face.
The gathering occurred just days before Luton was named an “area of intervention” by Public Health England because of concern over the number of coronavirus cases.
Mr Malik said on Wednesday: “Once again I regret my actions which were below the standard of my position and would like to sincerely apologise to the people of Luton for attending this gathering which was in breach of Covid-19 lockdown restrictions.
“There is no excuse for what I did – I should have known better and I accept full responsibility for my actions.”
A disciplinary process was launched by both the Labour Party and Luton Borough Council after a number of complaints were made about his attendance.
Mr Malik said: “I felt it was important for the disciplinary process – both at the council and within the Labour Party – to determine the outcome and the punishment for my actions, but after reflecting with my family over the last few days, we agreed that the best thing I could do for the town was resign from my position with immediate effect.”
He added: “I have learnt a valuable lesson from this, but I hope the consequence of my actions serves as a reminder to the people of Luton of the importance of following the Covid-19 guidelines as it remains a real and serious threat.”
A new mayor will be appointed on 29 September and will serve for the remainder of the municipal year.
Councillor Hazel Simmons, leader of Luton Council, said: “I would like to thank councillor Malik for his service as mayor of Luton.
“He made a mistake which he deeply regrets, and I know he and his family are really hurting right now.
“Prior to this he had been an excellent ambassador for the town both locally and nationally, raising a lot of money for charity during the process.
“What has happened is unfortunate, and I think it is right for him to step down at this time, but it’s important to recognise the fantastic contribution he has made to Luton.”