Trump and the First Lady brought flowers to the hospital in northeast Washington where the lawmaker was recovering after surgery following the shooting in nearby Virginia, the White House said.
A rifle-wielding critic of President Donald Trump opened fire Wednesday on US lawmakers practicing for a charity baseball game, seriously wounding a top Republican congressman and three others before he was killed by police.
The 66-year-old gunman was identified as James T. Hodgkinson of Belleville, Illinois, an ardent supporter of liberal Senator Bernie Sanders -- who said he was "sickened" by the "despicable act."
In a national address, Trump also appealed for unity following the morning assault in the Washington suburb of Alexandria, Virginia, which came amid bitterly partisan political tension in the US capital in the aftermath of a vitriol-filled 2016 election.
"We are strongest when we are unified and when we work together for the common good," said the US president.
Congressman Steve Scalise -- the number three Republican in the House of Representatives and a strong supporter of US gun rights -- underwent surgery after being shot in the left hip.
He remains in critical condition following initial surgery and blood transfusions, MedStar Washington Hospital Center said in an update late Wednesday.
"The bullet traveled across his pelvis, fracturing bones, injuring internal organs, and causing severe bleeding," a statement said.
"He will require additional operations."
Three others were shot and injured: a congressional aide, a lobbyist for Tyson Foods, and a US Capitol Police officer.
A second Capitol police officer suffered non-gunshot injuries, the FBI said. Two congressman said they had sustained minor injuries while trying to take cover.
Trump described Scalise as a "very good friend" and "patriot," telling him: "America is praying for you and America is praying for all of the victims of this terrible shooting."
He and First Lady Melania Trump later visited Scalise in hospital, bringing flowers.
The FBI said it had recovered and was attempting to trace two weapons, a rifle and a handgun, and was actively investigating Hodgkinson's "associates, whereabouts, social media impressions, and potential motivations."
According to his Facebook page, Hodgkinson was a fervent supporter of Sanders, the feisty independent who battled Hillary Clinton for the Democratic presidential nomination last year.
Hodgkinson's social media posts displayed strong anti-Trump sentiment.
"I know he wasn't happy with the way things were going, the election results and stuff," his brother, Michael Hodgkinson, told The New York Times. But he said news of the shooting came "totally out of the blue."
Sanders swiftly responded to reports the suspect had volunteered on his presidential campaign.
"I am sickened by this despicable act," he said.
"Let me be as clear as I can be. Violence of any kind is unacceptable in our society and I condemn this action in the strongest possible terms."
- 'Run, he's got a gun' -
"It will be play ball tomorrow night at 7:05," Congressman Joe Barton, manager of the Republican team, said at a news conference with Mike Doyle, the Democratic team manager.
Doyle put his hand on Barton's shoulder several times as the Republican, who was at the practice with his son, recalled the horror of realizing that friends and co-workers were under attack.
"You know, it shouldn't take an incident like this to bring us together," Doyle said, as Barton acknowledged that the present day highly-charged political atmosphere has widened the gap between parties on Capitol Hill.
After an all-members briefing where Democrats and Republicans held hands and prayed, House Speaker Paul Ryan and top Democrat Nancy Pelosi addressed the somber chamber and proclaimed lawmakers were "united."
The shooting took place just after 7:00 am (1100 GMT) as the Republican team practiced for the well-loved charity showdown.
Congressman Rodney Davis told CNN he was at the plate at the time, and Scalise was in the field at second base.
"I was batting, we heard a loud noise.... The next thing I remember was somebody on the field yelling, 'Run, he's got a gun.'"
Alexandria police chief Michael Brown said his officers arrived within minutes and engaged Hodgkinson, together with Capitol Police officers. The gunman was taken into custody and later died of his injuries.
Lawmaker Jeff Duncan said he was leaving the practice when he was approached by a man he later learned was the shooter, who asked if the team was Republican or Democrat before heading toward the field.
"I'm shaken up," Duncan said. "My colleagues were targeted today by someone that wanted to kill them."
- Gun rights advocate -
Barton had arrived at the US Capitol still wearing his red baseball uniform.
"The heroes are the police officers who attacked the shooter, and in doing so quite probably saved many, many lives."
Scalise's office said the 51-year-old was "in good spirits" before entering surgery, although the hospital later updated his status to critical.
The conservative from the southern state of Louisiana is a firm supporter of US gun rights. Last month he introduced legislation that relaxes restrictions on interstate gun sales.
Several Democrats were practicing at a different field when they heard the news, and immediately gathered to pray for their wounded colleague.
Democrat Nanette Barragan said it will be "bittersweet" when she takes the field for her first congressional baseball game -- under tightened security.
"We're going to look over our shoulder a little bit," she said.