This is despite concerns the European Commission would withdraw the proposal because it does not go far enough.
Parliament is expected to vote on the text in February or March.
Provisional political agreement comes after a year of discussions between Parliament and Council. The Commission first proposed a revision of the current EU rules on firearms in November 2015.
This was designed to make it harder to legally acquire high capacity weapons in the EU, allow better tracking of legally held firearms and strengthen cooperation between member states.
On Tuesday, European Commission President Jean-Claude Juncker voiced some disappointment with the deal, saying he wanted it to "go further."
He said, "We have fought hard for an ambitious deal that reduces the risk of shootings in schools, summer camps or terrorist attacks with legally held firearms."
He added, "Of course we would have liked to go further, but I am confident that the current agreement represents a milestone in gun control in the EU."
The agreement, he said, retains a majority of what the Commission originally proposed, such as the ban of automatic firearms transformed into semi-automatic firearms and the inclusion of collectors and museums in the scope of the directive.
It also covers the regulation of alarm and acoustic weapons, the regulation of internet sales, the regulation of deactivated weapons and more exchange of information between member states.
A Commission source said, "At the same time, the Commission regrets that some parts of the original proposal were not supported by the Parliament and the Council."
He added, "However, considering that the overall package is an improvement compared to the current situation, the Commission can accept the compromise."
The legislation has been steered through the European Parliament by ECR group deputy Vicky Ford.
The British MEP said the internal market committee, which she chairs, had "dedicated significant time towards finalising a text which works for legal holders of firearms and addresses those loopholes and inconsistencies which have existed in the past."
Speaking earlier, she said it was important that "clarity can be given" to citizens as to which concrete types of firearms would be affected by the proposal, adding, "The Paris and Charlie Hebdo attacks highlighted the potential dangers of blank firing or 'acoustic' weapons being reactivated.
"We have taken action to close that loophole and make it more difficult for these firearms to fall into the hands of terrorists who use them for such bloody carnage."
Further comment came from Robert Kaliňák, Minister for the interior of Slovakia, current holder of the EU presidency.
He said, "Current European laws on firearms have been in place since 1991 and in the aftermath of the series of terrorist attacks in Europe, including those in Paris in November 2015 and in Brussels in March, the need to address shortcomings in existing legislation has become ever more urgent."
He added, "This agreement provides for tighter controls which will help prevent the acquisition of firearms by terrorist and criminal organisations."