The activity of a (model) catalyst can depend on its surface structure. In turn, the surface structure can depend on the reaction conditions. We have used a novel high-pressure, high-temperature scanning tunneling microscope, which is set up as a flow reactor, to determine simultaneously the surface structure and the activity of a Pt(110) model catalyst at semi-realistic conditions for CO oxidation. By controlled switching from a CO flow to an O2 flow and vice versa, we can reversibly oxidize and reduce the platinum surface while imaging the surface with our STM. By simultaneously monitoring the gas composition, we have observed that the formation of the oxide has a dramatic effect on the CO2 production rate. Our results show that there is a strict one-to-one correspondence between the surface structure and the catalytic activity.