Xbox live gold has expired, Can the game that was previously purchased and downloaded continue to play?

Solution 1:

From the official microsoft faq (I guess it's the same as when the subscription expires):

What happens to my Games with Gold games if I cancel my Xbox Live Gold subscription?

On Xbox One, you’ll no longer be able to access your Games with Gold titles if you cancel your subscription. However, if you decide to renew your subscription at any time, you’ll be able to access and play your previously redeemed Games with Gold titles again.

On Xbox 360, any Games with Gold titles that you redeem as an Xbox Live Gold member are yours to keep, regardless of whether you continue your subscription.

source: https://support.xbox.com/en-US/my-account/xbox-live-membership/games-with-gold-faq

Solution 2:

Yes and no.

Games that you have bought or were gifted are yours and are not affected by your subscription. However, some game functionality might not be available. That depends on the game.

Games that you have had access through one of the subscriptions features, be it Games with Gold or Xbox Game Pass, games will no longer be playable.