I would argue that the similarities that exist between the two events are largely based on different groups' reactions after the initial incidents. Below are several similarities, because I see from the other answers that you already have many valid differences:
1. The Gulf of Tonkin incident and the attack on 9/11: In 1964, US ships were allegedly attacked on two different days in the Gulf of Tonkin by North Vietnamese forces. When the second attack occurred (there is still controversy about what actually happened), President Johnson was granted power by Congress to defend any Southeast Asian country that might come under attack as we did in the Gulf. This decision eventually led up to the significant number of US troops deployed to Vietnam. Immediately after the attack on 9/11, President Bush announced that the US would retaliate and soon sent troops into Afghanistan where Osama bin Laden (who claimed responsibility for the attacks) was last known to be hiding. At the time, similar to the Gulf of Tonkin Resolution granted President Johnson which showed Congress's support for some military action, the US Congress was solidly behind the President sending troops into Afghanistan. However, public opinion and much of the support in Congress have waned over the past 9 years to the point where some are calling for a complete withdrawal from Afghanistan just as many called for a complete withdrawal from Vietnam.
2. The conflict in Vietnam and the conflict in Afghanistan (a result of the 9/11 attacks) do have quite a few similarities. US and NATO troops do not really know whom to trust in Afghanistan just as Americans did not know whom to trust in Vietnam. When different sects of a country are fighting against one another and a foreign element is introduced, the indigenous people of the country have to try to figure out which side to take--not an easy thing to do when you consider that you might be on the wrong side at the end of the conflict and end up being punished for your earlier decision. Similarly, the conflict in both countries mainly involves guerrilla warfare, especially on the NVA's and Taliban's part. The US has had to adapt to situations where its modern technology does not always work the best in a rugged terrain which the enemy knows thoroughly.
One could argue that a sense of hollowness and inescapable sadness existed within both. The national feeling of forlornness that gripped America in the wake of the September 11 attacks and the escalation of both commitment and casualty of Vietnam might be seen as similar. At the same time, one could say that there was a level of shock at the basic nature of the September 11 attacks as well as the level of disconnect between policy actions and public outrage in the context of Vietnam. Yet, in the end, there are more differences than anything else. The September 11 attacks was a direct provocation on American soil, and took Americans by surprise. Their response was one of initial anger and shock. The Vietnam Conflict was a military escalation thousands of miles away, planned in war rooms and central commands of plush furniture at the White House or the Camp David Presidential Retreat. The attacks of September 11 took about two or three hours to complete, while the Vietnam conflict took place over half a decade.
I cannot see any similarities. There are similarities between Vietnam and the wars in Iraq and Afghanistan that we got into because of the 9/11 attacks, but there is no similarity between the attacks themselves and the Vietnam War.
The attacks were conducted by a terrorist group and not by a national army or even a group fighting to take control of their country from a government they did not like (like the Viet Cong were). The attacks took place here in the US, not in a foreign country and were aimed at civilians, not soldiers.
I see no significant similarities between the two except that The USA was involved in the both.
Vietnam was basically an internal matter of another country, in which USA interfered of its own choice. The entire scene of the action was in Vietnamese territory far removed from USA. In the case of Vietnam, the USA troops bombed and killed people of another country, The 9/11 event was quite opposite of this in many matters.
9/11 was a matter directly involving USA and the scene of action was on the US territory. In this case, people from outside managed to attack and kill the US citizen, in a single but a major attack.
However, American position in Afghanistan, which it attacked and occupied as an aftermath of 9/11 attack has developed into a Vietnam type tricky situation, where US is facing tough choices in terms of deciding the extent, and nature of continuation of its involvement there.