James Woods says he's absolutely fascinated by that 2006 photo of Michael Phelps signing a picture for a 9-year-old Katie Ledecky ... saying it's inspiring how she's now dominating in the same Olympics as her hero.
Woods is a big Phelps fan -- telling TMZ Sports he knows him from various poker games over the years and says he's one of the nicest people out there.
But you gotta see the way he gushes over the Ledecky pic ... it's pretty great.