SHORT ANSWER: No, it's not safe to lean a ladder against a gutter. Make sure you lean your ladder against a strong resting point that's sturdy enough to support it.
Follow the health and safety guidelines
When using an extension ladder or any other type of leaning ladder, it's important to follow the guidelines set out in the Health & Safety Executive's Safe Use of Ladders guide. These rules are specifically designed to minimise risk and keep you safe while you're working at height.
Here's what the HSE guide has to say about leaning ladders:
"For a leaning ladder, you should secure it and have a strong upper resting point, i.e. do not rest a ladder against weak upper surfaces (such as glazing or plastic gutters)."
Resting your ladder against a gutter is a bad idea because the gutter may not be sturdy enough to support it. If the gutter breaks under the weight of the ladder, the ladder will not be able to stay upright, and you'll likely fall to the ground.
So when you set up your extension ladder, be sure to lean it against a brick wall or another sturdy surface - NOT a plastic gutter or a window.
Using a ladder stay
Instead of leaning your ladder against a gutter, you can use a ladder stay to rest the ladder against a stronger point as demonstrated in the HSE guidelines (Safe use of ladders and stepladders: A brief guide, page 3, figure 4).
Ladder stays, also known as stand-offs, are easy to put on / take off and can be used for all sorts of different tasks, including professional and non-professional work.
Buy a Ladder Stay
Gutter photo from Pixabay