I don't think this is impossible, though a post-Trafalgar PoD is certainly challenging. IOTL the United Kingdom never faced a foe that was both near enough to it (that is to say, Western European) and also powerful enough to invade it. But if you change the sides of wars in some hypothetical ATL, that could change.
The issue of Alsace-Lorraine destroyed any prospect of a Franco-German alliance… but such an alliance (perhaps aimed at gaining British colonies) could have formed in some ATL where Germany never annexed Alsace-Lorraine or demanded harsh reparations from France and there wasn't some other incident (e.g. a very destructive several-year-long war) to cause recent bad blood between Germany and France. A Franco-German alliance could have out-built the UK navally—not before the launch of HMS Dreadnought or some equivalent (otherwise the UK has too much of an initial lead), but after it. It's pretty much the only force that could indisputably stand a good chance at invading the UK.
As for what scenario would bring that about, to pick the latest PoD I can, Austria does worse in the Second Schleswig War and gets the impetus to improve its army by the time the Austro-Prussian War comes around. Austria still does very badly against Prussia, but not as extraordinarily badly as it did IOTL, so an alarmed French Empire has time to intervene. After a long, nasty and bloody conflict, Austria marches into Prussia with French help, winning the war. The German Confederation becomes much more tightly bonded (and fixed under Austrian authority), to avoid states like Prussia breaking out on their own; however, it is still much less centralised than OTL's North German Confederation and later German Empire. There may or may not be a rump Kingdom of Prussia but it doesn't matter. The Franco-Russian Alliance is never formed, so the Anglo-French entente cordiale and the Anglo-Russian Convention (both results of the Franco-Russian Alliance) aren't formed either. Russia and the UK remain hostile, for obvious reasons. Germany (that is, the Austrian-led German Confederation) and Russia invade the Ottoman Empire in 1876 (IOTL Russia discussed this with Austria-Hungary, but Austria-Hungary, humiliated and unconfident of its ability to actually hold any new lands, refused), thus earning the enmity of the UK as both of them grab lots of land from the Ottomans. After some colonial conflicts, France chooses to side with Germany and Russia. There's a major naval arms race. In some WW1-equivalent caused by struggles in the Far East, South Asia or some other such theatre, the UK gets invaded.
That's a fairly hastily compiled five-minute scenario, and I'm sure you can all pick it apart in minutes, but it's a start.