Why Bruce Banner Knew About Thanos (Despite Only Hulk Meeting Him)
How did Bruce Banner know all about Thanos in Avengers: Infinity War when he'd only met the Mad Titan in his Hulk form? Lifting a scene straight from Jim Starlin's Infinity Gauntlet miniseries (albeit withotu Silver Surfer), Avengers: Infinity War used Bruce as a sort of harbinger - a voice of warning, calling out for all to hear that Thanos is coming.
There was just one problem with that role; at first glance, he shouldn't have known anything about Thanos at all. After all, Thor: Ragnarok seems to establish that Banner has absolutely no recollection of the time he spends in the form of the Hulk. The two personalities are treated as entirely distinct, with no flow of knowledge or experience between them. So just how did Banner know everything about Thanos? That apparent continuity problem has generated a lot of confusion online, with some going so far as to suggest Banner had secretly been replaced by Loki, who had somehow avoided death at Thanos' hands.
The truth, however, is probably far more simple; the boundaries between the Hulk and Bruce Banner identities are not quite so clear-cut as many viewers think. Indeed, all the way back in 2008's The Incredible Hulk, Bruce suffers flashes of memory of his time as the Hulk. He recoils from these in horror, finding the experience discomfiting and more than a little terrifying, and so refuses to dig into these memories. Meanwhile, Peter David's novelization establishes that the Hulk persona can indeed impress its thoughts and desires upon Banner; there are several scenes in which Bruce senses a part of himself actually wanting to unleash the monster, rather than flee from Ross' goons. This idea fits perfectly with The Avengers, where Bruce admits that he has a secret; "I'm always angry." The Hulk is always there, usually eager to be released, and it's just a matter of Banner indulging him.
All this means that the Hulk and Bruce Banner identities are not distinct, and that there is indeed the potential for a transfer of information between the two. They just try to avoid doing so because each feels hatred and disdain for the other; Bruce Banner is not willing to accept that the Hulk is a part of himself, and the Hulk refuses to accept that he is also Bruce Banner. Thor: Ragnarok is the logical extension of that, with Bruce fearful that the Hulk is about to take over permanently; given that context, would he really be likely to try to explore some of the Hulk's memories of the last two years? Better to remain ignorant than essentially risk being rendered dormant.
Moving on to Avengers: Infinity War, this means that it is possible for Bruce to know what the Hulk knew. The Hulk could easily present a sense of urgency, forcing Banner to realize that something is different - and that he needs to explore some of the Hulk's memories for once. It's also important to remember that this is a more mature, more complex Hulk than has ever been seen before in the MCU, so it's certainly not inconceivable that the Hulk could project more sophisticated memories rather than just flashes. No doubt the experience was unpleasant for both, but it was entirely necessary.
This also fits perfectly with what's expected to come in Avengers: Endgame. If the line between the Hulk and Bruce Banner is a lot more blurred than either want to admit, then it is indeed possible the two will be forced to finally accept one another - and that those two identities could even merge. That neatly explains why official Avengers 4 art has seemed to hint that the two are going to be combined into the "Professor Hulk" persona from the comics.