A 10th home league victory in a row for Arsenal, who later lost key man Ramsey to an injury, lifts them above Manchester United and Tottenham Hotspur after playing the same number of matches.
Arsenal thought that they had opened the scoring 13 minutes in, only for referee Anthony Taylor to rule out Ramsey's close-range volley.
For all of Arsenal's possession in the opening 25 minutes, all they had to show for it was Lacazette's glanced header wide from 10 yards.
The Gunners did manage to find a way through on the half-hour mark, though, and it was once again Ramsey who finished off the move - the 10th league goal he has been involved in this term.
The Welshman flicked the ball into Lacazette's path and it deflected back to him off a Newcastle player, giving him the chance to guide it away from Martin Dubravka with a first-time finish off the far post.
United were almost level a minute or so later through their only serious attack of the first half, as Solomon Rondon headed the ball past Sokratis and tested Bernd Leno at his near post, despite the angle being against him.
Arsenal played some impressive football in the first half and they deserved a second before the interval, which they almost scored through Lacazette right at the end, though his shot on the turn was headed off the line by Matt Ritchie.
Like the first half, the second period started slowly and it took until the 63rd minute until the first real talking point.
Lacazette spun in behind and saw his cross blocked by the arm of Paul Dummett, though Arsenal's appeals for a penalty were turned down and Sokratis powered the resulting corner wide.
There was to be an injury blow for Arsenal with a quarter of the game to play, as Ramsey limped off to be replaced by Mohamed Elneny.
The home side's failure to kill off the game could have set up a tense conclusion to the match, but Ki Sung-yeung's wayward shot was the best Newcastle could offer.
It was instead left to Lacazette to kill off the match with his lofted finish over Dubravka after getting between Jamaal Lascelles and Dummett to meet Aubameyang's headed pass.
Lacazette was denied a second by the referee's whistle for an apparent obstruction on Dubravka, but it was job done for Arsenal by that point as they did more than enough to move into third for the first time in more than two years.
ARSENAL (3-4-2-1): Leno; Sokratis, Mustafi, Monreal; Maitland-Niles, Guendouzi, Ramsey (Elneny 67'), Kolasinac; Iwobi (Aubameyang 61'), Ozil (Mkhitaryan 84'); Lacazette
NEWCASTLE UNITED (3-4-2-1): Dubravka; Lejeune, Lascelles, Dummett; Yedlin, Hayden (Ki 67'), Diame, Ritchie (Kenedy 75'); Perez (Muto 77'), Almiron; Rondon body check tags ::