WASHINGTON—The federal government will recognize the marriages of 1,300 same-sex couples in Utah who tied the knot before the Supreme Court put a halt to gay unions there on Monday, Attorney General Eric Holder said Friday.

The move gives same-sex couples married in Utah the same federal status as those who were wed in states where gay marriage is legal—currently 17 states, plus the District of Columbia. It means they will qualify for certain federal benefits. They will be treated as married for immigration purposes and be...