China won the women’s team gold at the world gymnastics championships. Its team edged the United States after a strong balance beam round.