Unless the Constitutional Council blocks it, the law will be promulgated in the coming weeks by President Francois Hollande and the first gay marriages will be able to be performed in a few months.
The law passed by a vote of 331-225.
The session reflected the tension of recent weeks, during which opponents of the same-sex marriage bill increased their protests.
Almost 1,000 police officers were deployed around the assembly to prevent attacks, while supporters and opponents of the law held separate demonstrations.
Tuesday's vote puts an end to half a year of parliamentary procedures to move forward with - and bring to fruition - one of Hollande's campaign promises.
France is a country deeply split over same-sex marriage, an issue which the right has made into one of its main rallying cries.
The political tension has spilled out into the street, where in recent days a growing radicalization has been evident with clashes with police and an increase in homophobic acts.
Prime Minister Jean-Marc Ayrault Tuesday expressed his confidence that the end of the parliamentary debate "puts an end to these absurd polemics".
But it does not seem that the right wants to bury the hatchet yet, and it has resorted to the Constitutional Council to stymie the law, although all the experts give this move little chance of success and say that the only recourse is to protest outside the established institutions.
Meanwhile, groups opposing the law have said that they will keep up the pressure by staging new demonstrations.
In pictures: A look at Anil Kumble's illustrious cricket career
Photos: Karisma Kapoor, Preity Zinta, Shraddha Kapoor at Mumbai airport
Spotted: Anushka Sharma and Diljit Dosanjh at Mumbai studio
Photos: Mallika Sherawat at a restaurant in Bandra
Photos: Tina Ahuja, Gizele Thakral at a calendar launch