Mr O'Doyle called a Tauranga City Council after-hours number and was told a contractor would come to let him out.
"By this time there was another half a dozen car owners who were also feeling a little unimpressed with the local council as well," he said.
"We started making our way to queue at the Dive Cres gate when a passing police car stopped, investigated our problem and then promptly opened the gate and ... let us all out, agreeing with us that this was a poor council performance and not a great look for our city."
Mr O'Doyle said the police deserved a "big thanks for seeing common sense".
The carpark was the closest parking facility to The Strand, Tauranga's main bar and dining area.
When Mr O'Doyle was home in bed an hour later, he got a call from the contractor tasked with letting them out of the carpark.
"I would have been pretty ****ed off by that stage if I was still there then," he said.
Mr O'Doyle said there had to be a better solution than closing the carparking facility at 10.30pm on weekend nights.
Tauranga City Council transportation operations manager Martin Parkes said the council was already looking at extending the carpark's hours of operation to 11.30pm on Thursday, Friday and Saturday nights from July 1.
The carpark was currently open 24 hours on Sunday, Monday, Tuesday and Wednesday.
On Thursday, Friday and Saturday evenings the carpark was locked and reopened at 6am.
"It is locked on these nights because of concerns by police at the anti-social behaviour that was taking place on these nights in the carpark," Mr Parkes said.
He said the contractor received on average two calls a month regarding cars locked in the carpark.
The cost of having the contractor come and open the gates after they had been locked was $30, which was paid for by the owner of the vehicle.
Mr Parkes said the council was not aware of any complaints about the carpark being locked.
Western Bay of Plenty police Inspector Karl Wright-St Clair said the police were "100 per cent" supportive of the council's stance on closing the carpark on Thursday, Friday and Saturday nights because of the anti-social behaviour that had occurred there in the past.