Cell towers get you to a neighborhood. Indoor walls, reflections, and sparse rural towers all limit how tight that circle can get. For room-level accuracy, phones switch to a denser set of radio beacons: Wi-Fi access points.
Google maintains a massive background database of Wi-Fi IDs paired with GPS coordinates, constantly updated by Android phones passing by, even when sleeping. When a device scans nearby Wi-Fi networks and measures their signal strength (RSSI), it checks those IDs against the database.
RSSI is not a perfect distance meter, but with several known access points it is another trilateration problem: stronger signal, closer AP. Combining Wi-Fi signals with cell tower trilateration narrows the location down from a general neighborhood to the exact room you are standing in.