B-29 program cost 3 billion USD in 1940s money, around 40 billion USD today while Manhattan stands at 2 billion 1940s USD. I always thought Manhattan Project was pretty expensive because well, it clearly created something quite extraordinary in immense time pressure and constraints. But just a new model of bomber? I mean, it has great range and all, but this cost seems a bit absurd.
The B-29 was THE state of the art bomber of WWII. It included a number of technological advances including the all important pressurized cabin which allowed flight at higher altitudes.
The simple answer to your question is the number of units produced. While there were nearly 4000 B-29 produced, there were only four bombs produced by the Manhattan project prior to the end of the war.