Early photography is more than a window on history. It is an uncanny and disturbing encounter with real people, the light reflected off their faces falling on chemically sensitised surfaces long ago.

The camera has been around now for nearly two centuries. Yet photographs from the 19th century have the same punch as pictures taken digitally today. We are not seeing mere pictures of people, but a trace of the people themselves, as they looked in life.

An 1863 carte de visite showing 'The Scourged Back', by McPherson and Oliver. Photograph: Joan Gage

A new website called Mirror of Race richly explores the power of early photography to transport us back in time. There's no cosy nostalgia here. As its name indicates, the site is concerned with the history of race. It brings together a large number of photographs that reveal experiences and ideologies of racial difference in 19th-century America. Not only are they haunting and troubling but the way they are presented is sophisticated and subtle.

I am struck by discomfort. These pictures are painful and awkward to look at, even when all I see is a young African American in middle-class Victorian dress. They reveal a society obsessed with racial contrasts, compelled to define people racially. The shadow of slavery runs through American history, lending these old pictures a ghostly immediacy. The rift they haunt has not gone away.

A tintype by Hathaway of an anonymous man in 'blackface', c1865. Photograph: Gregory Fried

Take a picture of a white man in "blackface" – Fig 26 in the site's main exhibition. It dates from about 1865. The culture of minstrelsy, in which white entertainers made themselve up to look black, is well known and a source of modern embarrassment. This picture makes it uneasily immediate. What is going through this man's mind? He smiles for the camera. Is the disguise a joke, or racist mockery – or does it also express a desire? It certainly reveals a culture in which racial boundaries were simultaneously insisted on and blurred.

A carte de visite of an amateur theatrical society dressed as a lynch mob, c1880. Made by WG Thuss, Emil Kollein and Otto Giers. Photograph: Greg French

Another shows a black soldier in uniform for the Union in the civil war. Here is a more reassuring image – an African American fighting for the abolition of slavery. This confirms an optimistic vision of progress. But many of the photographs on Mirror of Race are more peculiar and gothic. They speak of sick racial fantasies, lines enigmatically crossed. What does it mean when the hand of a white abolitionist is photographed, branded like that of a slave?

An amateur theatrical group pose as a lynch mob in the 1880s. Are they celebrating racial murder in the south after the civil war? Do they find it funny? It does not appear to be a protest. Perhaps strangest of all, this and many other photographs in the gallery are cartes de visite, intended to be left as calling cards and collected. This only adds to the sense of a society turning racism into culture, delighting perversely in the imagery of the very divisions that brought it to civil war. This is not the America of Abraham Lincoln but that of Edgar Allan Poe – weird and macabre. There are so many questions in this archive of discomfiting images. It's a spooky old mine of horrors.