Victorian Premier Daniel Andrews has formally apologised in State Parliament for old laws that treated people as criminals for being gay.

Key points: Apology delivered in front of men who were jailed for being gay

Apology delivered in front of men who were jailed for being gay Never too late to say sorry, Premier says

Never too late to say sorry, Premier says Past treatment of gays "shameful" says Matthew Guy

Mr Andrews delivered the apology in Parliament in front of a number of men, some of whom were jailed for being gay.

"It is never too late to put things right," he said.

"It is never too late to say sorry and mean it.

"There was a time in our history when we turned thousands of young men into criminals ... this was profoundly wrong."

Until 1981, thousands of men were charged with homosexual offences and faced penalties of up to 15 years' jail.

Mr Andrews said the Parliament introduced laws that sanctioned homophobia, and it had a responsibility to apologise.

"I can't possibly explain why we made these laws and clung to them and fought for them," he said.

"It is the first responsibility of a government to keep people safe. But the Government didn't keep LGBTI people safe. The Government invalidated their humanity and cast them into a nightmare."

Dozens of men gathered to hear the historic apology. ( ABC News: Stephanie Anderson )

Mr Andrews said everyone had the right to equal treatment.

"If you're a member of the LGBTI community, and there's someone in your life that you love, a partner or a friend, then do me a favour: next time you're on a tram in Melbourne, hold their hand," he said.

"Do it with pride. And defiance."

Opposition Leader Matthew Guy joined the apology and said the past treatment of the state's gay community was shameful.

"We now, as a Parliament, apologise to the victims of policies of intolerance [and] oppression that resulted in outcasting, depression and sadly even suicide," he said.

"I offer my formal apologies for any past policies, for past practices that led to the disgraceful treatment of those in our gay community.

"This apology is long overdue. It is about time and it is right."

Since September, gays and lesbians have been able to apply to have their convictions expunged under legislation proposed by the Napthine Government.

Anna Brown from the Human Rights Law Centre said the apology was a step forward by recognising the harm the laws caused.

"They can now apply to have these convictions removed, and really the apology is the last symbolic act of acceptance and acknowledgement," she said.

The rainbow flag will fly at State Parliament today.