A gaffer in moviemaking or filmmaking is essentially the chief lighting technician. The gaffer works with the Director of Photography to implement the lighting on a set.
Much like in a play or stage production, movies make extensive use of artificial lighting. This helps to set the tone and feel of the movie, and often involves a complex set of lights in a given scene. It is also worth noting that the exposure of film does not work the same way as the human eye, so movie sets often look quite different on the set than on the silver screen.
The gaffer runs a team of technicians who place and install the lighting in the scene, often including numerous small lights set up to illuminate specific features of the scene, such as actors' faces or a particular object in the scene, say.