It comes just two days before he announces his nominee to replace her on the high court.
The president and first lady Melania Trump – both wearing masks – stood silently at the top of the steps of the court on Thursday morning and looked down at Ginsburg’s flag-draped coffin, surrounded by white flowers.
The death of the liberal-leaning justice has sparked a controversy over the balance of the court just weeks before the November presidential election.
Mr Trump has called Ms Ginsburg an “amazing woman” but some spectators were not happy that he came.
Moments after he arrived, booing could be heard from spectators who then briefly chanted: “Vote him out.”
Mr Trump walked back into the court as the chants grew louder.
As the motorcade returned to the White House, there were also chants of “Breonna Taylor” from some spectators.