The sole, unambiguous confirmation that Grand Moff Tarkin is effectively aware that Darth Vader is the same person as Anakin Skywalker takes place in the “Tarkin” novel. That said, fans in a Reddit thread about this question have proposed a couple of reasons this must be the case, using evidence directly from the primary film continuity.
For instance, the thread’s top comment, by u/epicjeff, points to the fact that in “Star Wars: Episode IV — A New Hope,” Vader calls Obi-Wan Kenobi (Alec Guinness) his former master. This blatantly evokes Vader’s past life as Anakin, and Tarkin doesn’t question it. Of course, if it’s true that Lucas didn’t know Vader was Luke’s father when writing this scene, the reveal is an unintended consequence of the subsequent movie’s big plot twist.
Meanwhile, u/ewokwarrior_ mentions that Anakin is in charge of the attack on the Jedi Temple after Palpatine executes Order 66. By this point, Anakin has taken on the Darth Vader mantle but has not yet lost the fight with Obi-Wan on Mustafar, so he isn’t wearing his iconic suit. Tarkin, presumably, knows about the attack on the Jedi Temple and can figure out that its leader is the same person as the Darth Vader behind the black mask.