The government had argued that the word was exclusive to Islam and that its use by other religions could mislead Muslims and harm national security.
The church disputed this and argued that the word predates Islam as a term for God and is used in many places in a non-Muslim context.
It added that in Malaysia, the term is widely used among indigenous Christian tribes in Sabah and Sarawak.
No threat to security
The church also argued that the ban goes against the principle of freedom of religion and religious practice enshrined in the federal constitution.
Lau ruled on Thursday that the home ministry had failed to show how the Herald's use of "Allah" could threaten national security.
Lawrence Andrew, the editor of the Catholic weekly, said outside the courtroom that he was "very happy" with the decision.
"We called out for justice and we got it," he said, adding: "It is a victory for all Malaysians."
Thursday's ruling could open the door for other non-Muslim publications to use the word "Allah" as a translation for the word God in Malay language publications.
Hishammuddin Hussein, the home minister, said the government would appeal against the decision.