A bishop does not have the authority to excommunicate for that which Canon Law does not provide the penalty of excommunication. In other words, Canon Law does not recognize this as an excommunicable offense.
The bishop can impose canonical sanctions such as suspending clergy, prohibiting the celebration of mass in a certain chapel or the preservation of the Blessed Sacrament. He can take away the title “Catholic” from an institution.
Excommunication can only happen if
a) Canon Law says that excommunication is the penalty for this offense.
b) The pope imposes it
or
c) A male major superior of a Pontifical Religious Order requests it
The issue here is not whether the Governor or someone is for same sex marriage or same sex unions, the prohibition is directed to clerics, religious and employees of the Church. It also covers the use of Church property and the use of liturgical materials. The Governor is not an employee of the Archdiocese of NY. He can push anything he wants, even though he is wrong to do so.
Fraternally,
Br. JR, OSF