Short answer: Yes absolutely google maps is aware of elevation changes.
Longer answer: ...but its fairly far from correct.
Example - There's a well-travelled local climb of 2.5 km and 140 metres elevation change. Its an average of 5% but is 10% at the top with a flat bit at the bottom.
Google maps predicts 13 minutes to descend and 18 minutes to climb. That's roughly 40% longer to climb than to descend, which is utterly wrong.
I personally descended in 3:25 and best climb in 10:30, for a 300% increase in climb time vs descent time.
The 20 top riders have descended in under 2:30 and have climbed it in under 6:00 minutes for a 240% difference.
So google maps should be predicting a climb in 39 minutes for a descent of 13 minutes
or a climb of 18 minutes and a descent in 7:30.
tl:dr yes google maps is aware of elevation changes and does try to take that into account, but doesn't fully account for the increased work required to climb a gradient.
Further info:
Walking is predicted to be 40 minutes to climb and 34 to descend.
Driving is predicted to be 3 minutes either way.
Link to route on Google Maps
Strava segment for uphill
Strava segment for downhill
Site is in New Zealand, near Christchurch. I'm roughly in the middle of times for riders on those segments, slower uphill and faster downhill (mass advantage there!)