Does anyone read George Crabbe these days? How many people have even heard of him? In his lifetime (1754-1832), he enjoyed both critical and popular acclaim. Byron ranked him with Coleridge as "the first of these times in point of power and genius". Samuel Johnson, Walter Scott, Edmund Burke, Jane Austen and Tennyson were also admirers. But his reputation faded in the 20th century. Were it not for Benjamin Britten, he might have passed into oblivion.

Britten's opera Peter Grimes is based on a single chapter of Crabbe's long verse-narrative, The Borough, and as part of the composer's centenary celebrations will be performed three times next week on the beach in Aldeburgh, the Suffolk town where Crabbe grew up and which Britten made his home. Readers of the libretto, by Montagu Slater, will notice that a Dr Crabbe appears in the text carrying a black bag – doubtless a playful allusion to the fact that in his early life Crabbe served as a surgeon's apprentice. But the part is a silent one, and that seems sadly apt. The most famous line from Peter Grimes, the one inscribed on Maggi Hambling's shell on Aldeburgh beach – "I hear those voices that will not be drowned" – doesn't even appear in Crabbe's poem.

The drowning of Crabbe's voice would have surprised Byron, who called him "nature's sternest painter, yet the best". It would also have shocked EM Forster, who in 1941 gave a talk for the BBC praising him for "his tartness, his acid humour, his honesty, his feeling for certain English types and certain kinds of English scenery". Britten read these words when they were reprinted in the Listener, and came across a volume of Crabbe's poetry at around the same time, in a Los Angeles bookshop. The poetry was a revelation: "I suddenly realised where I belonged and what I lacked." He wrote the music for Peter Grimes on his return from the US and it had its first performance in 1945. Three years later, Britten founded the Aldeburgh festival – and invited Forster to participate with a lecture on Crabbe.

Crabbe doesn't name the seaside town featured in The Borough, but no one doubts it's based on Aldeburgh. Some of the descriptions still apply to the place today – houses "where hang at open doors the net and cork", marshland with "samphire banks and saltwort", tarry boats and rounded flints. Some of the holiday-making activities are recognisable too: "We amuse/Ourselves and friends with seaside walks and views/Or take a morning ride, a novel, or the news." Then there are the pubs:

All the comforts of life in a Tavern are known,'Tis his home who possesses not one of his own,And to him who has rather too much of that one'Tis the house of a friend where he's welcome to run.

The humour and affection in such lines belie the ambivalence of Crabbe's attitude to Aldeburgh, a place where he was "very miserable and miserably treated". Pressed into medical training at 14 by his father, he found himself unsuited to the profession: perhaps the only perk was the ready availability of opium, to which he had a lifelong addiction. Poetry was something he wrote on the side until his mid-20s, when he cleared off to London, hoping to make his mark. But London wasn't interested. Letters to potential patrons went unanswered, and he was penniless, starving and in despair, contemplating "a speedy end to a life so unpromisingly begun", when Edmund Burke came to the rescue. Burke not only helped him find a publisher but got him started on a new career as a curate. There was only one problem: the curacy procured for him was back in Aldeburgh.

By all accounts, Crabbe – who was awkward and bookish – wasn't much cop as a preacher, and his return to Aldeburgh was far from happy. His mother had died, his father had become a drunk, and the town was unappreciative of his talents. He left as soon as feasible; a living was found for him in Leicestershire and he eventually moved on to Trowbridge in Wiltshire. But it's Aldeburgh that underpins his best poetry. There are glimpses of it in The Village, a poem written at the time of his curacy, which sets out to deflate sentimental ideas about rural life. And it is central to The Borough, published almost 30 years later, which resurrected Crabbe's poetic career when most people assumed it was over.

Like almost all of Crabbe's work, The Borough is a long poem, part-narrative, part-lyric, part-sententious moral tract, written in rhyming couplets – the rationalism of Pope infused with the Romanticism of Coleridge and Wordsworth. It's divided into 24 sections covering different social strata, trades and places. Towards the end, Crabbe tells the stories of four characters: Jachin, the parish clerk; Ellen Orford, a widow; Abel Keane, a teacher; and Peter Grimes, a fisherman. In Britten's opera Peter becomes the eponymous antihero, with Ellen cast as his accomplice.

With its parables of human frailty and tales of lives ruined by debauchery or drink, the poem covers a lot of ground. But it's the section devoted to Grimes that is the most dramatic. Crabbe's son claimed that there was a real-life original for Grimes – an Aldeburgh fisherman who took on a succession of apprentices from London, all of whom died in suspicious circumstances. Crabbe himself, in a preface to the poem, described Grimes as a man "untouched by pity, unstung by remorse, and uncorrected by shame". Even his name evokes "crimes" and moral "griminess":

With greedy eye, he looked on all he saw,He knew not justice and he laughed at law;On all he marked he stretched his ready hand;He fished by water and he filched by land."

Grimes is brutal but, as Britten recognised, the townsfolk are also culpable in turning a blind eye to his savagery ("None inquired how Peter used the rope,/Or what the bruise, that made the stripling stoop"). It's only when they intervene, halfway through the poem, banning Grimes from employing any more apprentices, that the focus shifts. The rest of the poem records Grimes's descent into madness, as he is tormented by hallucinations, not least the ghost of his father. Though his sins are never pardoned, Crabbe's portrayal of him isn't lacking sympathy: "a lost, lone man, so harassed and undone/Our gentle females, ever prompt to feel,/Perceived compassion on their anger steal." Britten, too, allows him to achieve a tragic dimension.

To modern-day readers, Crabbe's treatment of Grimes, Ellen and others – a mixture of compassion and sermonising – points forward to the novels of Dickens. There are echoes of Charles Kingsley's The Water Babies, too. But some readers were shocked: "we feel our imaginations polluted," Francis Jeffrey wrote in the Edinburgh Review, "and are offended and disgusted when we are forced to look closely upon those festering heaps of moral filth and corruption". As Neil Powell points out in his biography of Crabbe, the low‑life characters objected to here are the very ones a modern-day reader finds most compelling. And even in his own time, Crabbe's social realism seems to have done him no harm commercially. In his 50s, after years scraping a living as a country parson, he became a poet whom publishers wanted on their list, so much so that John Murray offered £3,000 for one of his volumes – a figure few poets could command today, even though it was worth 80 times more then.

Crabbe's last years were comparatively serene. Even before his wife died, in 1813, after years of illness, he'd begun a flirtatious correspondence with a younger woman, and several more romantic involvements followed. He also spent increasing amounts of time in London. "There comes in age an abstraction of self from those about us," he wrote, but he remained alert and active until his death at the age of 77. He could never have guessed that his Peter Grimes would become the basis for one of the most famous 20th-century operas. But as is clear from the closing lines of The Borough, he did have his eye on posterity and trusted it would judge him kindly:

"This let me hope, that when in public viewI bring my Pictures, men may feel them true;'This is a likeness', may they all declare."