His television roles varied from Inspector Maigret to Edward VII, Oscar Wilde to Winston Churchill. And in film he played characters as different as Albert Spica, the coarse and violent gangster in Peter Greenaway’s “The Cook, the Thief, His Wife & Her Lover,” and the benign Professor Dumbledore.

Mr. Gambon took over the role of Dumbledore, a central character in the Harry Potter saga, when Richard Harris, who had originated it, died in 2002. Reviewing “Harry Potter and the Prisoner of Azkaban,” in which he first appeared in the role, A.O. Scott of The New York Times wrote that the film, though noteworthy for its special effects, was also, like the two earlier films in the series, “anchored by top-of-the-line flesh-and-blood British acting,” and noted that “Michael Gambon, as the wise headmaster Albus Dumbledore, has gracefully stepped into Richard Harris’s conical hat and flowing robes.” Mr. Gambon continued to play Dumbledore through the final movie in the…