TOKYO — Ariarne Titmus of Australia, not Katie Ledecky of the United States, won the women’s 400-meter freestyle gold. Ledecky, 24, came in as the defending Olympic champion and world-record holder. But Titmus, 20, swam a faster 400 in Australia’s Olympic trials than Ledecky did in hers. In the final on Monday, Titmus reeled in Ledecky after the American had built a lead of more than a body length. Here is how the race unfolded.