Three judges on the Court of Appeal ruled that 130,000 new party members who joined in the six months up to July 12 cannot vote in the leadership contest , overturning a High Court ruling on Monday.
Friday's decision is a blow to Labour leader Jeremy Corbyn, who is opposed by most of his lawmakers but has strong support among grassroots Labour members.
The case had been brought by five pro-Corbyn new members.
The court's decision backed rules originally set by Labour's governing body, the National Executive Committee (NEC).
Corbyn is facing a leadership challenge from little-known Labour MP Owen Smith.
A spokesman for Corbyn's campaign said the court had made the "wrong decision, both legally and democratically".