Is running an extension cord above a gutter safe?
It is not terribly safe, though weaving it over/under supports as they did at least helps to make sure it won't go flying around.
Temporary installations like holiday lights are always a bit of a problem. A few things to help mitigate potential problems:

GFCI - This is probably the most important thing. GFCI is now required for outdoor receptacles but many older houses don't have GFCI in all now-required locations (aka &quot;grandfathered&quot;).
Grounding - It should be a 3-wire cord, plugged into a functioning 3-wire receptacle (though if the receptacle does not have a functioning ground pin but is GFCI protected then that will cover most scenarios where grounding would otherwise make a difference.) Except, as pointed out by Ed Beal, if the lights are all 2-wire (no ground) then ground wire on the extension cord is absolutely useless. But I would discourage 2-wire extension cords anyway because they tend to be thin junk.
Make sure the extension cord is secured well.
Make sure the extension cord is properly rated. It should be designed for outdoor use (some are, many are not). It should be able to handle the necessary current (Amps). Any standard extension cord, by definition, can be plugged into a 15A receptacle and therefore carry up to 15A without tripping a breaker. But many (generally not designed for outdoor use, and often not grounded) are actually not appropriate for 15A usage. On the other hand, with modern LED lights, a whole house of holiday lights will typically use only a few Amps (often less than 1 Amp).
Every year before installation check for breaks in the cord. If you find small breaks but the inner insulation looks good then tape it up well with electrical tape (not duct tape). If you find large breaks or the inner insulation is damaged, replace it.