As gait adaptation is vital for successful locomotion, the development of field-based tools to quantify gait in challenging real-world environments are crucial. The aims of this study were to assess the reliability and validity of a smartphone-based gait and balance assessment while walking on unobstructed and obstructed terrains using two phone placements. Furthermore, age-related differences in smartphone-derived gait strategies when navigating different walking conditions and environments were evaluated. By providing a method for evaluating gait in the simulated free-living environment, results of this study can elucidate the strategies young and older adults utilize to navigate obstructed and unobstructed walking paths. A total of 24 young and older adults ambulated indoors and outdoors under three conditions: level walking, irregular surface walking, and obstacle crossing. Android smartphones placed on the body and in a bag computed spatiotemporal gait (i.e., velocity, step time, step length, and cadence) and balance (i.e., center of mass (COM) displacement), with motion capture and video used to validate parameters in the laboratory and free-living environments, respectively. Reliability was evaluated using the intraclass correlation coefficient and validity was evaluated using Pearson's correlation and Bland-Altman analysis. A three-way ANOVA was used to assess outcome measures across group, condition, and environment. Results showed that smartphones were reliable and valid for measuring gait across all conditions, phone placements, and environments (ICC2,1: 0.606–0.965; Pearson's r: 0.72–1.00). Although body and bag placement demonstrated similar results for spatiotemporal parameters, accurate vertical COM displacement could only be obtained from the body placement. Older adults demonstrated a longer step time and lower cadence only during obstacle crossing, when compared to young adults. Furthermore, environmental differences in walking strategy were observed only during irregular surface walking. In particular, participants utilized a faster gait speed and a longer step length in the free-living environment, compared to the laboratory environment. In conclusion, smartphones demonstrate the potential for remote patient monitoring and home health care. Along with being easy-to-use, inexpensive, and portable, smartphones can accurately evaluate gait during both unobstructed and obstructed walking, indoors and outdoors.