If your final destination is TSA (Sung Shan Airport in Taipei) you can easily take any of the busses that run from TPE (Chiang Kai Shek) to TSA. These run fairly late into the evening so I don't think you will have a problem.
Are you making a domestic connection from TSA to another city in Taiwan? If so, and you are looking for a place to stay there is the
Evergreen Transit Hotel located in Terminal II of CKS Airport (TPE). I have not stayed there...but I do remember a trip report from another FTer that had.