The advice is not binding, but judges ruling on cases before the court have generally followed the advocate's lead.
Wathelet issued the opinion in regards to a 2010 case involving a Romanian citizen named Adrian Coman who married his American husband, Claibourn Robert Hamilton, in Brussels in 2010.
So while the 28 EU countries "are free to provide or not for marriage for persons of the same sex", they must not limit their application of spousal rights in a way that infringes "on the right of citizens of the Union and their family members to move and reside freely within the territory of the Member States", Wathelet wrote.
"Romania's Constitutional Court recently approved and confirmed more than three million citizen signatures (in a country of less than 20 million people) calling for the national referendum".
Wathelet noted that the Netherlands and Belgium were the only two European Union member states that made marriage available to same-sex couples in 2004 when the European Union citizenship directive at issue was adopted.
The gay couple, alleging discrimination on the basis of sexual orientation, challenged the decision of Romanian authorities.
Next, the Advocate General finds that the directive makes no reference to member state law in order to determine the nature of "spouse", even though that concept must be interpreted autonomously and uniformly throughout the EU.
"While member states are free to provide for marriage between persons of the same sex in their domestic legal system or not, they must fulfil their obligations under the freedom of movement of European Union citizens".
Same-sex marriage is not legal in Romania.
He said the term referred to a "relationship based on marriage" and was neutral as to the sex of those involved and indifferent as to the place where that marriage was contracted.
Melchior Wathelet, who is a Belgian advocate in the court, said that the new rules will ensure that the rights of individuals are always upheld.
Same-sex marriage is recognized in at least a dozen European Union countries-including Germany and Malta, which passed legislation previous year.
Sophie in 't Veld, the Vice President of the European Parliament's LGBTI Intergroup, told PinkNews: "This is fantastic news and a landmark opinion for rainbow families!"
The ECJ has had a relatively benign history with the United Kingdom - unlike the more contentious European court of human rights in Strasbourg - but nonetheless became a symbol of compromised sovereignty during the Brexit referendum. They would have been compelled to do so had Mr Coman's partner been of the opposite sex.