The executive order temporarily banned entry for all refugees and visitors from seven mainly Muslim countries, until it was halted last week.
Judge Richard Clifton asked whether it could be discriminatory if it affected only 15% of the world's Muslims.
He is one of three judges on the appeals court in San Francisco, which will make its ruling later this week.
There was an hour of oral arguments from both sides on Tuesday.
Whatever the 9th US Circuit Court of Appeals decides, the case will probably end up in the Supreme Court.
What did the two sides argue at the appeals court?
The Justice Department was first to make its case, urging the appeal judges to reinstate the banning order.
Lawyer August Flentje said Congress had authorised the president to control who can enter the country.
When asked to point to evidence that the seven countries affected - Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen - present a risk to the US, he said a number of Somalis in the US had been connected to the al-Shabab group.
Then a lawyer representing Washington state told the court that halting the executive order had not harmed the US government.
Solicitor General Noah Purcell said the ban had affected thousands of residents of the state, with students delayed as they tried to come to Washington and others prevented from visiting family abroad.
A Muslim ban or not
The final minutes of the hearing were spent on whether the travel ban amounted to a shut-out for Muslims, which would be unconstitutional.
A 15-page brief issued by the Justice Department on Monday night argued the executive order was "neutral with respect to religion".
But in court on Tuesday, Purcell cited Trump's campaign statements about a Muslim ban.
He also pointed to statements made by one of the president's advisers, Rudy Giuliani, who said he was asked to come up with a way of making a Muslim ban work legally.
Judge Clifton said the ban only covered seven countries, and they were identified by the Obama administration and Congress as deserving of visa restrictions, based on a terror threat.
He asked: "Do you assert that that decision by the previous administration and congress as religiously motivated?"
No, Purcell answered, but President Trump had called for a complete ban and although this was not a complete ban, it was discriminatory.
What did the executive order do?
Its main components were:
- nationals from Iraq, Syria, Iran, Libya, Somalia, Sudan and Yemen - even those with visas - banned from entering the US;
- a temporary ban on all refugee admissions;
- the reprioritisation of minority religion (interpreted to mean Christian) refugee claims;
- a ban on all Syrian refugees;
- a cap on total annual refugee admissions to the US of 50,000.
It came into force on January 25 and caused some confusion at US and foreign airports because people were stopped from boarding planes or prevented from entering the US, and sent home.
There was strong condemnation and it was halted last Friday by a federal judge in Washington state.
As a result, people from the seven countries with valid visas were able to travel to the US again.
Washington state, Minnesota and other states want the appeals court in San Francisco to permit the temporary restraining order to stand as their lawsuit works its way through the courts.
Polls suggest that US public opinion is sharply divided on the issue.