We present modified cosmological scenarios that arise from the application of the gravity-thermodynamics conjecture, using the Barrow entropy instead of the usual Bekenstein-Hawking one. The former is a modification of the black hole entropy due to quantum-gravitational effects that deform the black-hole horizon by giving it an intricate, fractal structure. We extract modified cosmological equations which contain new extra terms that constitute an effective dark-energy sector, and which coincide with the usual Friedmann equations in the case where the new Barrow exponent acquires its Bekenstein-Hawking value. We present analytical expressions for the evolution of the effective dark energy density parameter, and we show that the universe undergoes through the usual matter and dark-energy epochs. Additionally, the dark-energy equation-of-state parameter is affected by the value of the Barrow deformation exponent and it can lie in the quintessence or phantom regime, or experience the phantom-divide crossing. Finally, at asymptotically large times the universe always results in the de-Sitter solution.