Stephens, who returned to competition at Wimbledon after nearly a year off because of a foot injury, recovered from a second-set meltdown to end ninth seed Williams's hopes of reaching a third major final this year.