However, thousands more -- all holding jobs in the military and security services -- were not being paid and it was unclear if and when they would be.
In 2007, Hamas seized Gaza after deadly clashes with militants of Fatah, the party of Palestinian president Mahmoud Abbas.
After the takeover, the Palestinian Authority ordered the civil servants to stop working, so Hamas hired more than 40,000 people to replace them in the ministries and the security forces.
It has been paying those workers ever since.
But after a reconciliation deal with Abbas that led to the formation in June of a national unity government, Hamas relinquished responsibility for paying salaries and demanded that the new government do so.
On Wednesday, UN trucks brought $30 million (24 million euros) in cash from the West Bank city of Ramallah, the government's headquarters, into Gaza through an Israeli-controlled crossing.
Signup to our newsletter and follow us on Facebook and Twitter!
Banks had refused to transfer the money directly, fearing sanctions for involvement in financing employees of Hamas, the Islamist movement that is on the US and EU's terror blacklists.
Gaza justice ministry worker Hana al-Abssi told AFP the payment was "a positive step for all employees."
Umm Yusef Saleh, another worker, had been queuing up since the morning.
"It's been months that we haven't been paid. I waited here from 7:00 am to receive my salary. I have debts to pay as well as school transport for my children," she said.
Gaza's 24,000 civil servants received wages of $1,200 on Wednesday, but the remaining approximately 16,000 military and security personnel were not paid.
The Palestinian Authority, which the PLO dominates, initially refused to pay the workers in June because they were appointed after Hamas took over Gaza, and therefore were not registered as its employees.
But in a bid to show a united front to the international community, which has pledged $5.4 billion to help reconstruct Gaza after a devastating war with Israel this summer, the rivals have tried to put aside their differences.
They held their first cabinet meeting earlier this month, gathering in Gaza, and agreeing on payment the civil servants.