Batman beats Superman because he has kryptonite. In the anime, Batman and Superman don't get along in the future because Superman works for the government and Batman is a vigilante. They both know each other's identity. As long as Superman works for the government, Batman is suppose to stay in retirement.
Batman comes out of retirement because Superman is in another country dealing with a foreign crisis. So the president orders Superman to put Batman down. Superman comes to batman to tell him that he needs to bring him in but Batman declines and so they set a dual date, Batman's choosing. Batman chooses the night time because Superman is weaker at night since his power comes from the sun. It's a great fight but obviously Superman is winning until Batman uses the ace up his sleeve, kryptonite obviously.
Batman had the Green Arrow shoot Superman with Kryptonite and I believe starts to choke him. Batman says something along the lines of, "remember it was me who won this fight". Then all of a sudden, batman has a heart attack. Superman scans his heart and he is in fact dying. Batman's dead, that's what Superman thinks at least.
Superman shows up to Batman's funeral and while he is mourning his dead friend, Superman hears a heart beat. It's Batman's heart and so Superman realizes that he's alive. Batman is actually watching the funeral from a long distance and wanted Superman to know that he was alive. The goal was to make the government think that Batman was dead and Superman is okay with that.
Scene cuts to Batman's new plan, he's going to build an organization to fight for justice since Batman is retired.