Since the onset of the HIV epidemic, the behaviour of men who have sex with men has been subject to intense scrutiny on the part of the behavioural and sociomedical sciences. What happens when we consider the work of these sciences to be not merely descriptive, but also constitutive of the realities it describes? The Gay Science pays attention to lived experiences of sex, drugs and the scientific practices that make these experiences intelligible. Through a series of empirically and historically detailed case studies, the book examines how new technologies and scientific artifacts – such as antiretroviral therapy, digital hookup apps and research methods – mediate sexual encounters and shape the worlds and self-practices of men who have sex with men. Rather than debunking scientific practices or minimizing their significance, The Gay Science approaches these practices as ways in which we ‘learn to be affected’ by HIV. It explores what knowledge practices best engage us, move us and increase our powers and capacities for action. The book includes an historical analysis of drug use as a significant element in the formation of urban gay cultures; constructivist accounts of the emergence of barebacking and chemsex; a performative response to Pre-Exposure Prophylaxis and its uptake; and, a speculative analysis of ways of thinking and doing sexual community in the digital context. Combining insights from queer theory, process philosophy and science and technology studies to develop an original approach to the analysis of sexuality, drug use, public health and digital practices, this book demonstrates the ontological consequences of different modes of attending to risk and pleasure. It is suitable for those interested in cultural studies, sociology, gender and sexuality studies, digital culture, public health and drug and alcohol studies.