The decision meant ballot papers would be sent out as scheduled next week, with results known in November.
Prime Minister Malcolm Turnbull, a supporter of same-sex rights, welcomed the ruling, which was handed down in Melbourne.
"We encourage every Australian to vote in this survey, to have their say," he told parliament in Canberra.
"As I have said in this House and in many other places, Lucy (wife) and I will be voting 'yes' and I will be encouraging others to vote 'yes'."
Turnbull's conservative government last year made an election pledge to hold a national referendum, but switched to a postal vote after the original plan was twice rejected by the upper house Senate.
The voluntary postal vote was strongly opposed by gay marriage advocates, who said it would be expensive and divisive, subjecting gay people and their families to hate speech.
Two same-sex marriage advocacy groups mounted challenges in the High Court, arguing Canberra exceeded its powers in funding the ballot without parliamentary approval.
A leading group behind the "yes" vote, The Equality Campaign, said it would be "hitting the ground running with hundreds of thousands of supporters talking about why marriage equality matters".
If the majority of Australians vote "yes", the government will hold a free vote in parliament on the issue, with MPs not bound by party policy or the postal ballot's result.
If there is a "no" outcome, there will be no parliamentary vote.
Disclaimer: No Business Standard Journalist was involved in creation of this content
