The president was joined by the First Lady, his daughter and son-in-law at the Tree of Life temple in Pittsburgh.
Meanwhile, hundreds of protesters gathered on the street chanting slogans against President Trump.
The visit came as mourners attended the first funerals for victims of the massacre.
The Trumps were greeted on October 30 by Rabbi Jeffrey Myers, who led them inside the temple, where the worst anti-Semitic attack in US history unfolded on October 27.
At a memorial outside, Melania Trump placed a flower and the president laid a small stone on a marker for each of the victims.
President Trump was joined by his son-in-law Jared Kushner, who is Jewish, and his daughter Ivanka, who converted to Judaism when she married Jared Kushner. Both are White House advisers.
Treasury Secretary Steven Mnuchin, who is Jewish, also joined the president.
Before his visit, President Trump condemned anti-Semitism. The alleged gunman was not a Trump supporter.
Critics accuse President Trump of fomenting a surge in white nationalist and neo-Nazi activity through divisive rhetoric which has seen him criticize immigrants and Muslims in particular.
Some Jewish figures and Pittsburgh’s Democratic Mayor Bill Peduto opposed the presidential visit.
More than 70,000 people signed an open letter from Pittsburgh-based Jewish leaders saying that President Donald Trump was “not welcome” in the city unless he “fully denounces white nationalism”.
The top four Republican and Democratic congressional leaders declined a White House invitation to join President Trump in Pennsylvania.
The White House has rejected any blame over the attack.
According to Reuters, members of Pittsburgh’s Jewish community were among about 2,000 demonstrators who held a protest.
As President Trump arrived at the synagogue, demonstrators chanted “President Hate, leave our state” and “Words have meaning”.
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…