Similarities between the two wars --
In Vietnam the US violated the "1954 Geneva Agreements on Indochina" even as they were being signed, and this led directly to the Second Indochina (Vietnam) War starting.
With Iraq the US violated the UN Charter and invaded Iraq.
With Vietnam the US used the "Communist" expansion threat as an excuse to intervene in Vietnam. In Iraq the US used the "WMD" excuse.
Vietnam had oil, minerals and rubber as export commodities and the US needed them. Iraq has oil.
In Vietnam the US installed a right-wing anti-communist military dictator, Ngo Dien Diem and supported his subsequent replacements. In Iraq they installed a undemocratic government which is not liked by the people.
The US supported the Viet Minh during WW-2 (training and arming them) then apposed them during the First Indochina War (1947-1954) in the fight against the French (the US armed the French) and the US continued to appose the Viet Minh after 1954.
The US armed Saddam Hussein when he was their ally against Iran then turned against him after that war.
The terminology for the enemy was similar. In Vietnam the US did not use the correct names for the fighting enemy -- The National Liberation Front of Southern Vietnam (NLF) became "Viet Cong", a shortened slang for Vietnamese Communist, something that less than 4% of the NLF members were. The Peoples Army of Vietnam (PAVN) was inaccurately called the North Vietnamese Army (NVA).
In Iraq the enemy was called "Terrorists" or members of Al Queida (which they were not until some 4-6 months after the US invasion).
By giving the enemy inaccurate names, the US attempts to turn people against those enemy and obtain support for their own actions.
Contrasts between conflicts. --
In Vietnam most of the people supported the Viet Minh, and its leader, Ho Chi Minh, and the idea of Vietnamese independence which he was fighting for.
In Iraq it was the opposite. Most people did not like Saddam Hussein and he was a military dictator who killed people who belonged to another Islamic sect plus killing the Kurds.
Vietnam was a slow build-up of troops while in Iraq it was a rapid invasion.
In Vietnam the troops did most of the fighting and security work. In Iraq the fighting was done early by the troops then "security work" was contracted out to "security contractors" and many other jobs that were done by the military in Vietnam because contract jobs in Iraq.
Edit:
In 1954 the "government of Vietnam" was the Viet Minh and its allies and they went on to become the government of the Peoples Republic of Vietnam. There was no government at the time that became the (southern) Republic of Vietnam. The main signatories to the agreements were France and the Viet Minh.
Yes, the US did not sign the agreements, but they promised to "abide" by the agreements. They were violating the agreements even as they made the promise.
The majority of the Vietnamese were supportive of the Viet Minh -- Even the US Secretary of State, John Foster Dallas, is quoted as saying, "We cannot allow elections to take place in the south as Ho Chi Minh and the Viet Minh will win at least 80% of the votes" in a free election.
Hanoi has always stated they sent PAVN troops to the south in mid 1965 shortly after the US committed the "first US fighting troops, the US marines". The "battle of Ia Drang" in November 1965 was the first battle between PAVN & US troops (in this case the newly created US Army-Airborne).
Gulf War-1 was in 1991 while the Iran-Iraq war was 1980-1988.
I could nitpick other aspects of Gerald's answer, but these are just some of his inaccuracies.