The defeat was Patrick Vieira's first at home since being appointed Palace manager and their first since losing at Liverpool in September.
Gerrard also became the first Villa boss in 23 years to win his first two Premier League games.
"We can't get carried away, it has been a positive couple of weeks. The players have been fantastic in their application. We had to dig in at times today but we managed to get over the line which is nice," Gerrard told the BBC.
Villa took advantage of Palace's vulnerability on set-pieces when Ashley Young's corner in the 15th minute was delivered deep into the box, where Matt Targett controlled the ball and shot low through the crowd to score.
Targett's opener was his first Premier League goal in over two years and only his third in the top flight.
"The analysts and us spoke about set pieces in the build up to the game. We know they [Palace] are not great at defending them," Targett said.
Gerrard praised Young for his set-piece delivery: "His job is to identify weaknesses in the opposition side. The players deserve all the credit for going and implementing that goal."
Palace had more possession in the first half but were unable to conjure up shots on goal as their midfield struggled to create chances with Villa's Marvelous Nakamba and Jacob Ramsey keeping midfielder Conor Gallagher quiet.
Villa looked like being reduced to 10 men when substitute Douglas Luiz was red-carded for a seemingly reckless challenge but the visitors got a reprieve when VAR intervened and the referee watched the replay, downgrading it to a yellow.
Villa doubled their lead late in the game when a flowing move down the left found McGinn on the edge of the box and he curled his shot past the outstretched arms of Vicente Guaita.
Palace finally scored in stoppage-time when Cheikhou Kouyate's cross to the near post found Guehi, who poked the ball past Martinez, but Villa held on for the three points.