Firstly, it must be recognised that Titanic's lifetime gross covers more than one theatrical release. Therefore if you are doing an apples to apples comparison you have to only count Titanic's original release only. So TFA should surpass that original release without much trouble.
Secondly, Titanic wins the actual attendance race even if TFA wins the money race.
The big question though is why has TFA not met the expecations of many to be the first to the $3 billion club despite easily being the biggest ever box office earner in the USA, and being a popular movie in markets that virtually didn;t exist back in the Titanic and to a certain extent Avatar days?
Titanic and Avatar did something that Star Wars could not. It got people who never go to a movie more than once to go see the movie twice or more. Star Wars had its legion of mega fans who are seeing it every weekend. But they are not a big enough group to help the movie break global records. They did the job in the USA though.
Titanic and Avatar both did something new in the movie world that captured people's imagination in the visual effects department. Titanic with its titanic sets, Avatar with making 3D a big deal and something people just wanted to experience. TFA didn't really bring anyting new to the cinematic table.
Also while Avatar was just a retelling of Fern Gully most people thought it was a fresh story, and so was Titanic. TFA was an old, very familiar story with a new skin. Lots of people, like me, who would have seen TFA more than once if the story had been completely new ended up being demotivated to see it a second time. So TFA did lose some repeat business because of the decision to re-tell A New Hope. It was an interesting thing to do, but ultimately it was a negative for a significant minortity of the audience.
“The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.” - Bertrand Russell
"When the power of love overcomes the love of power, the world will know peace."
Jimi Hendrix