There's always been a whiff of impropriety about attempts to apply scientific research to human sex behaviour. When Sigmund Freud first suggested that sexual emotion was the unrealised key to neurotic trauma, he was considered a dangerous madman. Even Marie Stopes, herself a revolutionary in bringing sex practices into the open, told her patients: "Don't please think about the unconscious mind; all the filthiness of this psychoanalysis does unspeakable harm." Investigations of sex practice by Henry Havelock Ellis and Richard von Krafft-Ebing were greeted with intense suspicion, while the "orgone box" experimentations of Wilhelm Reich (as portrayed in the film WR: Mysteries of the Organism) were held up to ridicule that was no less mocking than that applied to those Swedish "sex instruction" films of the 1960s.

When Alfred Kinsey revealed the findings of his copious researches, in Sexual Behaviour in the Human Male (1948) and its sequel on the human female (1953), Americans were shocked to the core. When the film Kinsey was released in 2004, its subject was compared (by Concerned Women for America) to "Nazi doctor Josef Mengele"; a damning book suggested he was a shameless homosexual who fiddled his research figures (and his staff); while the Generation Life pro-Christian group complained: "Alfred Kinsey is responsible in part for my generation being forced to deal with the devastating consequences of sexually transmitted disease, pornography and abortion." When the "sexologists" Masters and Johnson published Human Sexual Response, based on their laboratory investigations into sexual intercourse, the university which had housed their research declared that they'd had no idea what was going on and were profoundly shocked.

The Wellcome Collection's new exhibition of the pioneers of sex study touches on all these matters, but reminds us that we're all still asking, broadly speaking, the same questions as were being asked a century ago. What is "normal" sexual behaviour? Is this or that impulse "wrong" or "perverted"? Why should religion have the power to direct (or restrict) what we do in bed? Why should governments dictate what consenting adults do in private?

Science of sex Show all 4 1 /4 Science of sex Science of sex Science of sex A collection of sexual aids, with instructions (Wellcome/CC) Wellcome/CC Science of sex Science of sex Silver-bound hinged cowrie shell (Wellcome/CC) Wellcome/CC Science of sex Science of sex Marie Stopes's Mother's Clinic (Wellcome/CC) Wellcome/CC Science of sex Science of sex Ride’im: Man on all fours in red jacket Wellcome/CC

No subject in the field of modern sexual relationships has more exercised the British press and public than paedophilia, but we still seem confused about what it is. In the Rotherham sex abuse case, police who were confronted with the pleas of a 14-year-old girl, that she'd been serially abused by dozens of men, concluded that the sex was "consensual".

The introduction to the exhibition handily locates the first public discussion of sex in the Counter-Reformation of the 16th century: rather than brush it under the carpet as unmentionable, the Catholic church yanked it into the open, and required the faithful "not only to acknowledge the flesh as the root of all evil, but also to be bound by the imperative of confession, to declare every transgressive act and transform every desire into language".

The exhibition tries to transform the wilder shores of sex research and study into images and artefacts. It offers a trip through several galleries. "The Library" presents us with the visual data collected by leading sexologists over the years. There's Magnus Hirschfeld, a Berlin physician, whose Institut für Sexualwissenschaft promoted scientific knowledge as a way to counter unfair treatment of sexual minorities, especially gay men and transsexuals; the institute was raided by the Nazis in 1933 and his books and photographs were burnt.

A century earlier there was Krafft-Ebing, the man whose book Psychopathia Sexualis popularised the terms "sadism", "masochism" and "fetishism", and whose collection of postcards includes a charming study of a dominatrix in Bavarian-maid costume enthusiastically riding a gormless-looking gentleman wearing a burgundy jacket with a horse's bit between his teeth.

Havelock-Ellis was an enlightened doctor who liked to observe and record sexual behaviour. His book Sexual Inversion, published in 1897, two years after the imprisonment of Oscar Wilde, was the first to suggest that homosexuality might be inborn and natural rather than volitional and perverse. His own sexual kink was urolagnia, namely being turned on by the sight of someone peeing.

Last but not least among the writers comes Henry Wellcome, the founder of the Wellcome Collection, a profusely bearded, heroic-looking chap whose dream was to gather material illustrating the history of human health and medicine. He was especially keen on "sexually themed objects from different cultures" and encouraged helpers around the world to find him phallic objects as evidence of a primeval, pan-human cock-worship.

Wellcome's exhibits are the flower of the collection. Erotic scenes on plaster casts, purporting to be ancient but clearly 19th century, show how excited the Victorians were by the discovery of erotic imagery all over Pompeii. Cowrie shells and porcelain fruit sculptures open to reveal sexual jiggery-pokery inside. Huge phalluses dangle wind-chimes or are clutched in the arms of seated children (an image of fertility among young crops). Here's a "gynaeplaque" or foam model vagina, allegedly a teaching aid, available for inspection (or worse) on the open side of a leather briefcase, circa 1925. Here's a wonderful 1845 picture entitled The Secret Companion, showing a mournful-look gentleman of fashion lying on a chaise longue, fully dressed but significantly clutching a handkerchief, apparently in "the last stage of mental and bodily exhaustion from Onanism or Self-Pollution". This dates from a time when it was seriously believed that "wasting" semen could lead to paralysis.

"The Consulting Room" closes in on two figures who offered solace to the sexually perplexed in the early 20th century: Sigmund Freud and Marie Stopes. Freud's breakthrough invention, psychoanalysis, was the result of his discovery that nervous disorders didn't have physical causes. Among the pictures here are three studies of a shaven-headed woman seemingly in the grip of "hysteria", a malady previously thought to be the result of unchecked female desire. Freud relied on hypnosis and free association to unlock buried memories.

Photographs of Marie Stopes's Mothers' Clinic and her horse-drawn "birth control caravan" are joined by some splendid letters, from people unimpressed by her teaching on contraception ("Dr Stopes, Go back to your own country [Scotland] and preach your filthy methods there. Decent English people are disgusted at your filthy suggestions in Married Love") and by desperate ladies who treated her as a 1920s Pamela Stephenson ("Dear Doctor, I am writing to you for your kind advice as I am very worried. The man I am marrying this year had an accident a few weeks ago and while I was helping to remove his bloodstained and torn clothes, I couldn't help but see that his sex organs were very large, and the thought of marital relations has worried me since, as I myself am small in that respect…")

A gallery called "The Tent" examines the anthropological studies of Bronislaw Malinowski, a Polish aristocrat who embedded himself with the Trobriand islanders in 1915, ate with them, learned their language and slept with them. He discovered that, far from being savages governed by instinct and nature, they had sophisticated sexual codes of behaviour. The "Classroom" gallery is devoted to Alfred Kinsey's awesomely detailed sex surveys and his wide collection of erotica: he and his team were especially interested in Peruvian erotic pottery, mostly depicting anal sex.

After this, the exhibition runs out of steam visually, but its work is pretty well done – revealing that, no matter what advances in science may reveal about the connectivity of the brain, the proliferation of cancer cells or the clairvoyance of genetic sequencing, human sex behaviour refuses to be pinned down. The reasons why A fancies B, why some people yearn to have sex with household pets, footwear or machine parts, why others desire to change the sex they're born with and why prelates and parliaments, from the Vatican to sub-Saharan Africa, want to tell people how to conduct their sex lives, remain, despite all the surveys and research and taxonomies in the world, bafflingly inscrutable.