President Bush made a surprise five-hour visit to Afghanistan on Wednesday to meet with President Hamid Karzai and to see for the first time the country created after the United States went to war against the Taliban in retaliation for the terrorist attacks of Sept. 11 , 2001 .