Barta, who was Jewish, was born in Álmosd. He first competed at the Olympics in 1924. As a member of the Hungarian water polo team he finished seventh. He played all four matches as goalkeeper. On club level he played for Újpesti TE
He was part of the Hungarian water polo team which won the silver medal in 1928 and the gold medal 1936. In Amsterdam at the 1928 Summer Olympics he played all four matches as goalkeeper. Four years later in Los Angeles he played one match as goalkeeper. He died in Budapest.