After Harry Potter, the Avengers is the second highest grossing movie franchise with $2.142 billion. However, the Avengers is likely to move into the #1 spot by the end of this year. While there are no more Harry Potter movies currently scheduled to be released, Iron Man 3 is still bringing in cash at the box office and Thor: The Dark World is scheduled to be released in November.
While Harry Potter currently has a $248 million lead on the Avengers, the Thor: The Dark World box office combined with the remaining box office run of Iron Man 3 should be enough to close the gap. Thor: The Dark World should at least gross in the $250 million range. While it's true that the first Thor movie just grossed $181 million at the U.S. box office, the sequel is likely to get a post-Avengers bump just like Iron Man 3 did.
Even if Thor: The Dark World falls short, Marvel Studios has Captain America: The Winter Soldier on deck for early next year, so Harry Potter's days at the top are definitely numbered.