Yes. The federal government must now recognize valid same-sex marriages.
The U.S. Supreme Court's June 26, 2013 decision in U.S. v. Windsor cleared the way for same-sex married couples to receive federal benefits. In Windsor, the Supreme Court struck down the section of the federal Defense of Marriage Act (DOMA) that limited marriage to a union between a man and a woman. You can read more about that decision here.
As a result, legally married same-sex couples will qualify (for the most part) for federal benefits - regardless of where they live. However, the rules for eligibility do vary among federal agencies.
Many federal agencies, such as the U.S. Citizenship and Immigration Services (USCIS) and the U.S. Office of Personnel & Management, look to the place of celebration (where the marriage was performed) to determine whether same-sex married couples are eligible for benefits. If you're in a valid marriage, you will qualify for immigration status and federal employee benefits (if either of you works for the federal government), even if you live in a non-recognition state.
It wasn't clear how the IRS would approach this issue until August 2013, when the U.S. Department of Treasury ruled that all same-sex couples that are legally married in any U.S. state, the District of Columbia, a U.S. territory or a foreign country will be recognized as married under all federal tax provisions where marriage is a factor.
The Treasury Department further clarified that federal recognition for tax purposes applies whether a same-sex married couple lives in a jurisdiction that recognizes same-sex marriage (such as California) or a non-recognition jurisdiction (such as Texas). But the decision does not apply to same-sex couples in domestic partnerships or civil unions.
Other federal agencies, including the Social Security Administration, only recognize marriages that are valid in the state of domicile (where the couple lives) for the purposes of granting federal benefits. This means if you're in a same-sex marriage but live in a non-recognition state, you aren't eligible for Social Security benefits on your spouse's work record. If you live in one of the 14 jurisdictions that recognize same-sex marriage, you will qualify for benefits. This rule also applies to Medicaid and Supplemental Security Income, Medicare, Bankruptcy filings, and benefits under the Family Medical Leave Act.
Lambda Legal is a great resource for getting the latest information on these tricky legal issues: http://www.lambdalegal.org/publications/after-doma