Gandolfini's acting credits included roles in "The Last Castle" with Robert Redford, "The Mexican" with Brad Pitt and Julia Roberts, and "Surviving Christmas" with Ben Affleck.
In recent years, he had starred in several movies, including the Oscar-nominated "Zero Dark Thirty," "The Taking of Pelham 1 2 3" and "Killing Them Softly."
Gandolfini was also known to children, voicing Carol, a wild thing, in the 2009 movie adaptation of Maurice Sendak's classic "Where the Wild Things Are."
He took to the stage to do a reading of Sendak's "In The Night Kitchen" to mark the author's 80th birthday.
News of the actor's death spread quickly, drawing shock and sadness from those who had worked with him.
"James Gandolfini was a kind, funny, wonderful guy. I'm so lucky to have worked with him. Sending love to his family. Such a sad, sad day," Olivia Wilde, who starred with the actor in "The Incredible Burt Wonderstone," said in a post on Twitter.
Actor Steve Carell of "Office" fame, who also appeared in "Wonderstone", simply said on Twitter: "James Gandolfini. What a great loss."
New Jersey Gov. Chris Christie described himself as a "huge fan" of Gandolfini.
"It's an awful shock. James Gandolfini was a fine actor, a Rutgers alum and a true Jersey guy," he said.
If his managers are right, and he died of a heart attack, it struck much too early, said CNN's chief medical correspondent, Dr. Sanjay Gupta.
"(The) average age of someone having a first heart attack -- if this is in fact what we're talking about -- is usually in the mid-60s," he said.
Risk factors such as smoking, lack of exercise, obesity and high cholesterol can lower the age range significantly, according to Gupta.
Gandolfini is survived by his wife, Deborah, and their 9-month-old daughter, Liliana. He is also survived by a son, Michael, from another marriage.