It is, if you don't want to get sued.
Defending an infringement lawsuit can cost you tens of thousands of dollars even if you win.
Don't you have the spark of creativity that it takes to come up with your own catchy title?
A lawsuit is not by any means a given here. It depends on the poem and the line from it that is used for the title.
And an easy way to avoid the risk of any lawsuit is to acquire permission to use the words from the copyright holder. If the value of or market for the poem is not affected by the composer's use, there is no reason not to expect that permission will be granted.
Not all uses of rights protected material, in other words, is infringement, or actionable. Facts and specifics matter.
One additional note on costs of an infringement claim: If a copyrighted work is federally registered prior to infringement, the copyright holder is eligible for statutory damages of between $750 and $30,000 per infringed work, with a judge at his discretion awarding as little as $200 to the copyright holder against an innocent infringer and $150,000 per infringement against especially egregious intentional willful infringers.
But most infringement cases will be settled between the copyright holder and infringer out of court. Sometimes the copyright holder only seeks to be compensated fairly for the unauthorized use of their work - for example, a settlement demand letter demanding of the infringer the amount of the copyright holder's typical licensing fee.
In other words, not all or even most cases of infringement will cost tens of thousands of dollars. The costs depend on the work infringed, the type of infringement and the copyright holder, among many other factors to be considered.