It stopped short of calling the Bosnian war killings a genocide.
The murder of nearly 8,000 Bosniaks (Bosnian Muslims) was carried out by Bosnian Serb forces – allies of then-Serbian President Slobodan Milosevic.
The massacre, in what was supposed to have been a UN safe haven, became a symbol for the atrocities of the Balkan wars.
Meanwhile, a Dutch court has rejected an attempt to hold the United Nations responsible for the killings.
Burden ‘lifted’
The resolution – which the Serbian government sees as a crucial step in its attempts to join the European Union – was approved after almost 13 hours of heated negotiations in the Belgrade parliament.
The pro-Western governing coalition managed to pass the motion with a slim majority – 127 MPs voted in favour, out of a total of 250. Only 173 were present for the vote.
"The parliament of Serbia strongly condemns the crime committed against the Bosnian Muslim population of Srebrenica in July 1995," says the text.
It formally extends "condolences and an apology to the families of the victims because not everything was done to prevent the tragedy".
The head of the governing coalition’s parliamentary group said during the debate that approval would help close a tragic chapter in Balkan history.
"Condemning the crime against the Bosniaks of Srebrenica, while paying respect to the innocent victims and offering condolences to their families, will lift the burden off future generations," Nada Kolundzija was quoted as saying by Serbia’s B92 website.
But opposition deputies criticised the text, describing it as "shameful" for Serbia. Some nationalist politicians voted against, while others abstained in protest.
Velimir Ilic, an opposition MP, said: "Why do you want to put a mark on the future generations that they will never wash away?"
Serbian nationalists had argued that any resolution must also denounce crimes committed by Bosniaks and Croats during the 1992-95 war.
The BBC’s Mark Lowen in Belgrade says the resolution comes after years of denial in Serbia that the Srebrenica massacre even took place.
The resolution has been criticised by Bosniaks and Muslims in Serbia because it does not describe the Srebrenica massacre as an act of genocide.
It has been recognised as such by the UN war crimes tribunal in The Hague.
Several Bosnian Serbs have been convicted over their role in the massacre, when Bosniak men and boys were taken from their families and shot dead. The town had been designated a UN "safe haven" under the protection of Dutch UN troops.
The Bosnian Serbs’ wartime leader, Radovan Karadzic, is currently on trial in The Hague. The general accused of masterminding the killings, Ratko Mladic, is still on the run.
Lawyers for the victims’ relatives have tried to hold the Dutch government and the UN accountable for failing to stop the massacre.
But on Tuesday, The Hague Appeals Court upheld a 2008 lower court ruling affirming UN immunity from prosecution, which it said was essential for it to be able to carry out its duties around the world.