The 37-year-old Gonzalez, who also played for Deportivo La Coruna, has no top-flight coaching experience but the Barcelona-based club decided his work with the B team merited promotion to take charge of the first-team squad.
"We are delighted with Sergio's personality and he knows the club perfectly," sporting director Oscar Perarnau told a news conference.
"We are very pleased with his training methods and the way he has said he wants to play," he added.
"He has little experience as a coach but everyone has to start one day and we believe he has what it takes."
Aguirre is leaving Espanyol when his contract expires next month after an indifferent campaign in which Barcelona's second club flirted with relegation.
Winless since the end of March, Espanyol finished in 14th place, three points above the drop zone in a crowded lower half of the table.
Espanyol's La Liga rivals Levante announced on Tuesday they had broken off talks with Joaquin Caparros over extending his contract to next season.
- Sports & Recreation
- Deportivo La Coruna