It is always important to look at individual words and lines of texts in context in order to understand the meaning that the author is trying to convey, and this poem by Samuel Johnson is certainly no exception. Note the context of this line in the first stanza:
How rarely Reason guides the stubborn Choice,
Rules the bold Hand, or prompts the suppliant Voice,
How Nations sink, by darling Schemes oppres'd,
When Vengeance listens to the Fool's Request.
Fate wings with ev'ry Wish th' afflictive Dart,
Each Gift of Nature, and each Grace of Art,
With fatal Heat impetuous Courage glows,
With fatal Sweetness Elocution flows,
Impeachment stops the Speaker's pow'rful Breath,
And restless Fire precipitates on Death.
The first stanza is where Johnson outlines his central argument, which is how humans always long for "vanities" that actually make their lives more difficult or bring tragedy along with them. Humans, Johnson argues, never let "Reason" guide them in their wishes or the "stubborn Choice." Johnson paints a picture of humans that exposes them as constantly desiring things that they fail to see will only bring them misery, sadness and tragedy. In the line that this question focuses on, these wishes are compared in a metaphor to an "afflictive Dart" that is thrown to cause harm. Humans have these wishes that they think are benign and harmless, but actually, Johnson argues, the desire that humans have for "vanities" is something that only ends up harming them. The "dart" therefore literally applies to some kind of small missile that can be thrown to cause pain and hurt somebody. Johnson uses this term as a metaphor to describe how humanity's constant desiring of various vanities only brings pain to itself.