Magoosh official solution :
Split #1a: subject-verb agreement. The main subject is "the Battle of Antietam", a singular noun. The main verb, at the beginning of the underlined section, must be singular as well, not plural. Choices (A) & (C) & (E) have singular verbs, but choices (B) & (D) make the mistake of having plural verbs, "rank" and "have" respectively.
Split #1b: let's look at the tenses of these verb. Choice (A), "ranks", and choice (C), "has", have singular verbs, the correct tense. Choice (E) --- "has ranked" --- is the present perfect tense, and this is awkward: this suggests that it "has ranked" one way, but now ranks differently. Without some kind of contrast, use of the present perfect tense makes no sense here.
Split #2: the idioms with "rank". The verb "rank" takes the proposition "as" --- "to rank as" is correct. Choices (A) & (E) have this. The construction "to rank at" is incorrect: choice (B) makes this mistake. The noun "rank" takes the preposition "of" --- both choices (C) & (D) have this ---- but, here they are using a word in its noun-form instead of its verb-form, which makes the sentence a bit wordier, more awkward, and less direct. "The Battle ranks as …" --- that's sleek direct. "The Battle has the rank of …." --- that's flabby and wordy by comparison. Choices (C) & (D) are not outright wrong, but they're less preferable because of this.
Split #3: what follows the last comma. The preposition "with" ---- "with almost 23,000 casualties …" is clear and direct: choices (A) and (E) have this. The participle "having" is dubious ---- the noun modified should be "the Battle of Antietam" the subject, but it doesn't touch that --- it touches "American history" and doesn't modify that. A modifier after the verb can modify the subject if the [subject] + [verb] unit is relatively short, but here, this modifying clause comes more than a dozen words past the subject it modifies, so we can't invoke that rule: "having" is incorrect, and choices (B) & (D) make this mistake. Choice (C) illogically has "who", which can only modify a person, neither "American history" nor "the Battle of Antietam" --- this is incorrect.
For all these reasons, the only possible answer is choice (A).