Despite some of his over the top performances (I'll bet the set of Young Frankenstein still has bite marks on it!) Wilder was playing for the emotion of his character in a given situation. Yes, an actor can add some laughs but generally it's the script and the situation --including character and dialogue that makes a scene funny. Ever watch someone try to "ACT" funny in a scene that has no inate humor? It's embarrassing! Big gestures, exaggerated expressions and delivering your lines with unusual emphasis can't make something funny which isn't. For proof, I offer the opposite of Gene Wilder—Jack Benny...and many others such as Rita Rudner. When the writer creates a funny character and puts him in a funny situation that's when an actor goes to work and makes the emotions of that character come alive. For both Directors and actors, THAT'S how you get laughs. It might even make people think you are a comedic genius.
God bless the actors and directors who are secure enough to play a scene for all it's worth and not make the mistake of thinking it is the actor alone that is getting the laughs. We all work in a collaborative artform. No one knew that better than Gene Wilder. may he rest in peace.