The title "To a Shade" frames the poem as an apostrophe to a dead person. The term "shade" is often specifically associated with underworld spirits in ancient Greek and Roman myth, but it can refer to any ghost.
Lines 1-3 begin addressing this "Shade" in a fairly plain, conversational tone. The speaker calls the shade "thin," emphasizing its deprivation in the afterlife and perhaps expressing a touch of pity. The speaker then suggests that the shade might have recently "revisited the town," perhaps "to look upon your monument." Though the town and monument aren't named, these clues—along with other work Yeats was publishing at the time, and his body of work in general—start to establish a topical context for the poem.
The "Shade" is the ghost of Irish nationalist leader Charles Stewart Parnell, who had died in 1891, shortly after a scandal involving an extramarital affair caused his political downfall. Even in disgrace, Parnell remained a popular and respected leader among many Irish nationalists, and after years of fundraising, a statue honoring him (the Parnell Monument) was unveiled on O'Connell Street in Dublin in 1911. Yeats wrote "To a Shade" roughly two years later, in September 1913. The poem imagines, then, that Parnell's ghost might have left his tomb to check out the new Parnell statue.
The speaker, meanwhile, is clearly Yeats himself, who was born in a Dublin suburb and was deeply invested in all things Irish. He's considered the greatest Irish poet of his age, and in the early 20th century, his work began to incorporate more topical commentary on modern Ireland, in contrast with the mythological material that dominated the poems of his youth. He went on to write several other poems about Parnell and his legacy, including "Parnell's Funeral" (the title poem of Parnell's Funeral and Other Poems, 1935), "Come Gather Round Me Parnellites," and "Parnell."
Yeats generally admired Parnell (though his feelings varied over the years) and felt the public had judged him unfairly in the adultery scandal. To that end, "To a Shade" criticizes Dublin's ingratitude toward Parnell and public servants like him. Although the city had built Parnell a "monument," it had done so only after his disgrace and death. The snarky parenthetical in line 3—"(I wonder if the builder has been paid)"—implies that the city might even have been ungrateful and cheap enough to stiff the statue's sculptor! (The sculptor, Augustus Saint-Gaudens, was paid, but the statue was funded partly via subscriptions from Irish-American donors—in other words, Dublin didn't pay for it in full.)