The visitors made a fast start and opened the scoring inside five minutes when Elneny scored his first Premier League goal of the season from the edge of the box after Aubameyang failed to convert Hector Bellerin's cut back.
Arsenal lost defender David Luiz to injury but put the result beyond doubt through an acrobatic Aubameyang finish in the 66th minute as Mikel Arteta's side secured all three points to move up to ninth in the league table.
"This game showed our focus is still there in the Premier League," Arteta told Sky Sports. "We believe that anything is possible if you're picking up points, and we wanted to put bad results out of the way.
"We had a great attitude, some moments of real quality and had total control from the start."
Newcastle, who collected eight points in four games in April to distance themselves from the relegation zone, struggled to impose themselves, but they remain nine points clear of the relegation places.
"I have sympathy for Fabian Schar. He tries to win the tackle. Maybe a yellow card but certainly not a red," Newcastle manager Steve Bruce said.
For Arsenal, the first win in four games in all competitions should give their confidence a boost before they look to overcome a 2-1 deficit in Thursday's Europa League semi-final second leg against Villarreal.
"We needed this one, I think," said Aubameyang, who made his first league start since April 3 having recovered from malaria.
"After a few games without winning it was important ahead of our game on Thursday."