Illumination of the Check Engine Light can be caused by a loose or worn gas cap.
Car Problem Reports
GMC Yukon XL Denali Check Engine Light Due to Gas Cap Issue
GMC Yukon XL Denali Problem
Average Mileage: 57,333 mi (35,000 mi - 86,000 mi)
Visitor, 2007 GMC Yukon XL Denali, 35,000 mi
Was on the freeway. Lost almost all power/acceleration. Pulled off freeway and called dealer. Check engine light was on. Car lurched along when trying to go. Dealer said maybe gas cap was loose. Opened gas cap, turned tightly to hear three audible clicks, then started and stopped the car 10-12 times (per Dealer instructions) and the problem went away. Same thing happened to my sister's 2000 Denali. Same solution worked.
Visitor, 2007 GMC Yukon XL Denali, 51,000 mi
Check engine light on for one day; checked gas cap and was loose so tightened it. Check engine light still on one week later
Visitor, 2007 GMC Yukon XL Denali, 86,000 mi
Indicator light, diagnosis engine reports gas cap issue