This is a sci-fi story set on Earth. From the depths of space comes these microbes that latch onto electromagnetic fields. Anything electronic is rendered useless. There's the usual stuff where governments try to solve the issue but make it ultimately worse. It's only when they realise that the microbes surround the planet that they realise it is futile.
The story closes with people having returned to a simpler life, using medieval farming methods, not using electricity in any form, getting about by horse, etc.
I think it was a short story.