This ruling invalidates key provisions of the 1996 Defense of Marriage Act. Note that this does not apply to registered domestic partnerships, civil unions, or similar formal relationships recognized under state law.
Any same-sex married couple legally residing in any of the 50 states including Washington, D.C., a U.S. territory, or a foreign country will be covered by this provision. This ruling applies for federal purposes, even if the couple is residing in a state where same-sex marriage is not recognized; as long as they were married in a state where same-sex marriage is recognized.
Individuals who have been married for one or more prior tax years that are still open under the statute of limitations (2010, 2011, and 2012) may, but are not required to, file refund claims to be treated as married couples for federal tax filing for those past years. Some married couples may have a signing agreement with the IRS, or other special cases, where they may be able to file refund claims for even more years prior.
As a result of this ruling, an individual enrolled in an employer-sponsored HRA can now add their federally-recognized same-sex spouse (as defined above) as a dependent on their HRA plan, if their employer allows dependents to be covered by the HRA.
See the official ruling here: IRS Revised Ruling 2013-17.