When to replace a group head gasket (and how to tell it is the gasket)
Most people replace the pump, the grinder setting or the whole machine before they look at the cheapest wear part on it.
A group head gasket is a silicone ring roughly the size of a coaster. It sits in the group head and seals the portafilter against it, which sounds trivial until it stops doing that. Water takes the path of least resistance, and the path of least resistance is around your coffee rather than through it.
The four signals, in the order they appear
First, the portafilter starts locking further round. A healthy gasket stops the handle near the six o'clock position; a compressed one lets it swing to seven or eight. Second, a thin ring of spent grounds appears on the basket rim after knocking out the puck. Third, water or coffee runs down the outside of the group during a shot. Fourth, and only fourth, shot times collapse and everything tastes thin.
Why it happens faster than the calendar suggests
Silicone does not wear out from use, it wears out from heat cycles. A single-boiler machine that switches on at seven and off at nine has already cycled twice before the first shot. That is why a home machine used twice a day can need a gasket in a year, while a machine left on all day might last longer per shot pulled.
The fifteen-minute job
Remove the shower screen and its retaining screw, pry out the old gasket with a flat screwdriver, clean the groove of coffee oil and scale, then press the new one in flat side down. Warm it in water first — it seats more easily and you are less likely to pinch an edge. Refit the screen and pull a shot with no coffee to check for leaks around the rim.
What not to do
Do not overtighten the portafilter to compensate for a leaking gasket. That compresses the new one prematurely and stresses the group collar, which is a much more expensive part. If the handle needs force to stay put, the gasket is already finished.