Look in the index of large poetry anthologies. Most anthologies contain an index of first lines. If the line you're looking for is a first line, and the poem is rather famous, this method will give great results. "The Columbia Anthology of American Poetry" and "The Columbia Anthology of British Poetry" are just two examples.
Check online poetry databases. The Academy of American Poets website contains search features for finding lines of poetry as well as the complete poems from which they originate.
Place the line of poetry you wish to find in your favorite search engine. This is usually the quickest way to find what poem a particular line comes from.