Each accounted for between 1.1 million and 1.2 million deaths in 2014.
The WHO said the tuberculosis figures were unacceptable for a disease that could be cured.
Medecins Sans Frontieres said the statistics were “disheartening” and warned the world was “losing ground” on tackling resistant forms of TB.
The WHO’s Global Tuberculosis Report 2015 shows the huge strides that have been made in tackling TB, with the death rate being nearly halved since 1990.
And the number of infections has been falling by 1.5% a year since 2000.
Deaths from HIV/Aids have also been falling rapidly because of improved access to anti-retroviral drugs.
Dr Mario Raviglione, the WHO’s tuberculosis director, told the BBC News website: “Tuberculosis and HIV are now competing to be the number one cause of death from infectious disease in the world.
“Tuberculosis now ranks alongside HIV.”
Most new cases of TB are in China, India, Indonesia, Nigeria or Pakistan.
Deaths from HIV/Aids have been falling since the mid-2000s, and stand at 1.2 million a year.
Overall there were 1.5 million tuberculosis deaths in 2014.
But 400,000 of them are officially counted as Aids deaths as they were in HIV positive patients.
The WHO now considers TB and HIV to be effectively joint top killers.
WHO director-general Margaret Chan said there had been “tremendous impact” since 1990, but added that “if the world is to end this epidemic, it needs to scale up services and, critically, invest in research”.
Dr Raviglione agreed, saying that if the international investment in TB matched that of HIV, then “we could have accelerated the decline in mortality”.
The report also highlights the dangers of tuberculosis becoming resistant to antibiotics.
About three in every 100 new cases of TB could not be treated with first choice antibiotics.
Dr Grania Brigden, from Medecins Sans Frontieres, said it was “yet another year of disheartening statistics” that should “serve as a wake-up call”.
She added: “We’re losing ground in the battle to control drug-resistant forms of TB, and without considerable corrective action, the vast majority of people with multi-drug resistant TB won’t ever be diagnosed, put on treatment, or cured.”
The World Health Organization will shift to its End TB Strategy next year, which aims to cut deaths by 90% by 2030.