The National Union of Rail, Maritime and Transport Workers said staff would stage a walkout over working conditions and staffing.
Drivers will strike from 9pm on 11 July until one minute past midnight on 14 July. The US president is expected to be in the country on 13 July.
Thousands of people are expected to protest against his visit, with a six-metre tall balloon of Mr Trump as a baby planned to be flown over the capital.
The first lady, Melania Trump, is expected to join him on the three-day “working visit". The president will meet the Queen, likely at Windsor Castle.
A meeting with Theresa May is also expected to take place, either at 10 Downing Street or the prime minister's country house, Chequers.
The US ambassador in London has said Mr Trump will not avoid visiting London despite the expected protests, saying demonstrations would not deter the “thick-skinned” president.
“He will definitely be coming to London,” Woody Johnson said in an interview in April.
Around half a million passengers a day travel on the Piccadilly Line, which links central London to Heathrow Airport.
Mick Cash, RMT general secretary, said: "There have been repeated problems on the Piccadilly Line going back a number of years which have led to dispute after dispute and the failure of LU management to get a grip has tipped the situation over the edge yet again.
"That is why we have had no option but to put on these strike dates.
"Every effort by RMT reps to negotiate a settlement has been obstructed by the company and it is now down to LU bosses to start listening to their members, take the raft of issues at the heart of this dispute seriously and start engaging in a way that will allow us to make some genuine progress."
Additional reporting by PA
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies