Both Bach and Beethoven were German western music composers. The truth is both Bach and Beethoven contributed immensely to the advancement of classical western music during their time. I really don't think Bach was in any better than Beethoven because both were extremely talented song composers.
Beethoven was born 20 years after the death of Bach, and he became a great admirer of Bach's music styles. And most of the time, he would use the preludes of Bach's songs in his own compositions. This, to me, was just a sign of love and a clever to appreciate someone's else works.
So, the supposed greatness of Bach over Beethoven is simply because Bach came earlier before Beethoven, and probably because Beethoven used to make use of Bach's music in his own compositions. Beethoven's musical compositions are great because Beethoven himself was greatly influenced by Mozart and Haydn. And Bach was great too.