In the Bawdy section of the Rude Britannia: British Comic Art exhibition which opened this week at Tate Britain, there's a disembodied fibre-glass arm. It pokes rudely out the gallery wall, attached to a metal spring that causes it to move, rhythmically, up and down. The arm ends in a hand whose fingers are closed around an invisible object – but there's no mystery about what the object might be. The title of Sarah Lucas's piece is Wanker.

Many of us, I'm sorry to say, will have seen that slow, strumming gesture sketched in the air by drivers who have just overtaken us on the M4. It's a masterstroke by Ms Lucas to select it as an embodiment of British rudeness, for it does several things with admirable economy. It accuses us of habitual masturbation (much ruder and more personal than calling us a fool or a cuckold), it shakes an aggressive fist, it impersonates a large and intimidating phallus, and it gesticulates at its enemies with a kind of insulting slowness.

God we're rude, aren't we? The British are so rude. We're obsessed with bums, tits, willies, lavatory humour, vicars, knickers, smells, foreigners, fat tummies, fat slags, Fat Les, fat wrestlers, Benny Hill, Carry On Up The Khyber, Viz, Private Eye, men dressed as laydeez, women dressed as anarchic schoolgirls, sitcoms that offer howling tsunamis of verbal abuse, from The Young Ones to The Thick Of It. We love to see an irate, fictional British hotelier smacking his Spanish waiter around the head. We admire the host of BBC2's Newsnight when he roasts politicians with scarcely believable belligerence. We quiver when a middle-aged, redheaded quiz-show hostess tells her guests how thick, ugly and badly dressed they are. We lap up radio shows in which grouchily opinionated men insult members of the public who hold views contrary to their own. We celebrate Christmas by buying our loved ones "lavatory books" with titles like Is It Just Me Or Is Everything Complete Shit In Pants?

And we love to consider our own rudeness. Rude Britannia is also the umbrella title for six hours of programmes broadcast on BBC4 next Monday, examining whether Britain has become "an impossibly rude and selfish country", with special reference to Till Death Do Us Part and the life of Kenneth Tynan. And this month sees the inaugural exhibition of the "international cult cartoonists and animators" behind Modern Toss magazine, with its colourfully offensive adventures of Mr Tourette and the Drive-By Abuser.

How did we become addicted to rudeness – in the sense of fart-joke vulgarity as well as personal insult? Is it a phenomenon of British art history, a leitmotif of British popular culture, or something firmly engrained in the British character?

It's clear what motivated Hogarth, "the founding father of British art". He was driven by a wholesale dislike of the very un-Englishness of the "age of elegance". He hated the upper classes' obsession with foreign art and foreign styles. Houses were designed according to the principles of Palladio and his fellow Italians. Furniture was either French or constructed by English cabinet-makers from French or Italian styles. Aristocrats loved collecting foreign artworks, and favoured rococo luxuriance and classic themes from the school of Boucher.

Viewing the scene with a jaundiced eye, Hogarth complained about the invasion of bloody foreigners. Picture dealers, he griped, were "continually importing shiploads of dead Christs, Holy Families, Madonnas and other dismal, dark subjects, neither entertaining nor ornamental..." He looked at the faces of Olympian loveliness and wasn't impressed: "That grand Venus (as you are pleased to call it) has not beauty enough for the character of an English cook-maid." Instead of painting predictable subjects from the Bible, from mythology or French pastoral scenes, he gave the world vulgar realism. His prints are crammed with character, action, behavioural giveaways, tortured animals, lecherous clergymen and fair day revels. They fairly reek with decay and misbehaviour, drink and venery, sex and violence, even though the surroundings are often magnificent drawing rooms. What is Hogarth doing in these paintings? He is (excuse my French) taking the piss.

In roughly the same period – the reign of George II – literary satire was growing fangs. In the forefront was Jonathan Swift, dean of St Patrick's Cathedral, Dublin. Though born in Dublin, Swift came from blunt Yorkshire stock. He is central to any discussion of British rudeness, not only because his career was a series of furious attacks on politicians and clergymen but because he was obsessed with shit. Critics prefer to talk about his "excremental vision" but it amounts to the same thing. Among his scatological poems is the tender "Cassinus and Peter", which sings of the loveliness of his lady friend before concluding: "No wonder how I lost my wits/ Oh, Celia Celia, Celia shits!" His is the ultimate rejection of polite society as a fatuous concealment of reality. As one critic put it, Swift's excremental obsession was his way of insisting that "sublimation – that is to say, all civilised behaviour – is a lie". Indeed. Gulliver's Travels is a brilliantly comprehensive satire on the puniness of human (especially political) ambitions, the grossness of human physicality, the folly of scientific enquiry and the bankruptcy of human morals. It is, one can say, the rudest insult to humanity ever devised.

Swift's successors found it hard to stomach. William Thackeray wrote: "When Gulliver first lands among the Yahoos, the naked, howling wretches clamber up trees and assault him, and he describes himself as 'almost stifled with the filth which fell about him'. The reader of the fourth part of Gulliver's Travels is like the hero himself in this instance. It is Yahoo language: a monster gibbering shrieks, and gnashing imprecations against mankind – tearing down all shreds of modesty, past all sense of manliness and shame; filthy in word, filthy in thought, furious, raging, obscene."

These are strong words from Thackeray, himself no slouch when it came to satirising human folly and venality. But they express a sentiment – "You have gone too far" – that's central to British rudeness. One of the most shocking exhibits in the Rude Britannia exhibition is Gerald Scarfe's caricature of Mrs Mary Whitehouse, the Sixties Christian "Clean Up TV" campaigner. After she complained about the "Schoolkids Issue" of Oz, the underground magazine, in 1971, Scarfe produced a drawing entitled Mrs Mary Righteous explains her position to the Pope, in which she is depicted lying, spread-eagled and fishnet-stockinged, before the supreme pontiff, engaging in sex with Rupert Bear. (It's the revelation of her underwear that's most disturbing). An outraged Mrs Whitehouse sued Scarfe and The Times. In a letter to Scarfe (which is on show at the exhibition), the newspaper's lawyer explained: "I think a jury would probably award Mrs W some damages... My belief is that the average jury would think: 'He can't get away with this!'"

Going too far, getting away with it, pushing your luck – there's something schoolboyish about British rudeness, about being quite the naughtiest kid in the class. And how quickly the connoisseur of British humour moves from naughtiness to bodily functions. The Fifties cabaret duo Flanders and Swann had a routine called "Mum's Out, Dad's Out, Let's Talk Rude", which climaxed with the line: "Pee, poo, belly, bum, drawers". One looks at the high number of bottoms and willies in the Rude Britannia show, and marvels at how fundamental our sense of humour has always been. Paul Sandby's startling 1784 aquatint, Coelum ipsum petimus Stultitia, seems to offer the spectacle of a gigantic hot-air balloon catching fire in a London field; it is, in fact, a colossal arse blowing clouds of smoke and flames into the sky, taking the mickey out of scientific breakthroughs in human flight. An anonymous hand in 1740 made an etching called Idol-Worship or The Way to Preferment, which shows two men finding their path to the corridors of power blocked by another massive human bottom, which they have to kiss before they can get anywhere.

There is surely a political dimension in our fondness for fundaments, and it's to do with British people's attitude to the monarchy. Before the English Civil War, it would have been considered extremely unwise to criticise the Crown. We cannot imagine, say, Henry VIII responding well to caricature or lampoon. After the Restoration, when the divine right of kings was no more and government was decided by democratic franchise, attitudes to the monarchy could be more robustly expressed. When William I appeared from Germany to sit on the English throne, awkward in manner and unable to speak English, he was ridiculed in public by wits such as Lady Mary Wortley Montague. By the time his son William II inherited the throne, the monarch's powers had dwindled. Artists and engravers felt free to depict the king as an ordinary man who belched, farted, picked his nose and mistreated his wife.

The social satires of 18th-century Britain – the heyday of Gillray, Cruikshank and Rowlandson as well as Hogarth – are the result of this empowerment, this freedom to be rude to the highest in the land, this thumbing of the popular nose at monarchy and authority. It was beyond belief that such an attitude could have flourished in France after the return of the Bourbon monarchy, or in Italy, Spain or Germany. But it took root in England. The 18th-century Englishman was a remarkable figure, an aggressive, imperialist merchant revelling in the prosperity of the age and the greatness of his nation over other continentals; he was also suspicious of the new power-brokers who had replaced the old hierarchy of the royal court. He wasn't sure if the people representing him in Parliament were quite up to scratch; and he reserved the right to hold them to account, to confront and abuse them, should the occasion demand. And thus was born the Rude Briton.

In the 20th century, "rudeness" in art was confined to the lower orders: it derived from the Victorian music hall and burlesque show, and turned up in seaside postcards with their personnel of busty blondes, furtive Peeping Toms, battle-axe wives, henpecked husbands, guileless vicars, beachside lovelies, newly-weds and gormless soldiers. George Orwell, in his essay "The Art of Donald McGill", recoiled from their "overpowering vulgarity...an utter low-ness of mental atmosphere", but concluded that they performed an important function: "They stand for the worm's-eye view of life, for the music-hall world where marriage is a dirty joke or a comic disaster, where the rent is always behind and the clothes are always up the spout, where the lawyer is always a crook and the Scotsman always a miser, where the newly-weds make fools of themselves on the hideous beds of seaside lodging houses... Like the music halls, they are a sort of saturnalia, a harmless rebellion against virtue... On the whole, human beings want to be good, but not too good, and not quite all the time."

What's happened to us all in the last 50 years is difficult to pin down. There was, everyone agrees, a democratising of rudeness in the Sixties. From being grounded in low-class entertainments like the Carry On movies (tits, loo jokes, and effete "cissies" who were never likely to come out as gay), gross comedy went middle-class and invaded the mainstream. Joe Orton's plays featured bent coppers, rent boys and sexually voracious housewives (speaking wonderfully Wildean dialogue). That Was That Week That Was and Round the Horne brought topical satire and camp slang to the nation's startled eyes and ears. Detecting a loosening of societal reins, television sitcoms ceased their gentle herbivorous existence (see Terry and June, The Likely Lads), and plunged into foul-mouthed exchanges of bile (see Till Death Us Do Part, Love Thy Neighbour.) Language became freer and coarser. The human body – undressed, cross-dressed, disarrayed and laid completely bare – became a common sight in popular culture in a way that hadn't been seen since the 18th century.

That's why we're such rude people. It's all an atavistic throwback. The template for modern, piss-taking, toss-potting man was set nearly 300 years ago, by Hogarth in art and Swift in literature. Revolting close-ups of gargantuan bosoms and bottoms, a cavalcade of gurning faces of the greedy, the lusty and the deranged – all followed the revelations of corrupt human nature in The Rake's Progress and the visit to Brobdignag in Gulliver's Travels. A fascination with portraying excrement and genitalia, as a counterblast to gentility and civilisation, grew in this period and lives today in the works of Young British Artists. And a chronic, ungovernable urge to say the unsayable, push the boat out, see how far you can bend the rules of behaviour, in a country with a toothless monarchy and a government made of people like yourself – that's what has given us our unsavoury but vivid identity.