I know that if a character spends enough time and gold in game they can gain proficiency with something they aren't already proficient in, but is there a similar mechanic for expertise?
Yes, if you are a human, half-orc, or half-elf
These are all of the official ways to get a doubled proficiency on checks (like Expertise) except through the following ways:
- Dwarf racial trait: Stonecunning [History of stonework only]
- Bard class feature: Expertise
- Cleric (Knowledge Domain) class feature: Blessing of Knowledge [two of Arcana, History, Nature, or Religion only]
- Fighter (Banneret1) class feature: Royal Envoy [Persuasion only]
- Ranger class feature: Natural Explorer [Intelligence and Wisdom checks related to favored terrain only]
- Rogue class feature: Expertise
- Rogue (Scout) class feature: Survivalist [Nature and Survival only]
- Sorcerer (Draconic Bloodline) class feature: Dragon Ancestor [Charisma checks with dragons only]
- Prodigy feat
1: This is the generic name for the Purple Dragon Knight found in Sword Coast Adventurer's Guide
So how to train it?
The Dungeon Master's Guide (Chapter 7) offers an alternate reward called Training where, as a GM, you can reward quests or the like with:
special training ...
A character who agrees to training as a reward must spend downtime with the trainer (see chapter 6 for more information on downtime activities). In exchange, the character is guaranteed to receive a special benefit. Possible training benefits include the following:
- The character gains inspiration daily at dawn for 1d4 + 6 days.
- The character gains proficiency in a skill.
- The character gains a feat.
(emphasis mine) So if you are awarded this Training and chose the Prodigy feat (must be human, half-orc, or half-elf), you could train to gain a feature similar to Expertise (albeit only for skills).
It sounds like you're asking whether you can acquire an Expertise-like effect (i.e., adding twice your proficiency bonus when using a particular skill/tool/etc.) purely through the Training downtime activity, spending only time and money (plus whatever narrative is required to acquire a trainer) rather than feats, class features, and so on.
There are two things called 'training' in the rules. One is the downtime activity listed in Xanathar's Guide (p.134), where you can spend gold and downtime to gain proficiency with a language or tool. This does not provide a mechanic for gaining new skills or feats, nor anything like Expertise.
The other is a non-treasure reward listed in the DMG (p.231), which can get you a new skill proficiency or a feat, among other things, at the cost of training time alone (no gold required, as it's a reward in lieu of treasure). While it doesn't specifically have a way to directly give you Expertise, the listed benefits of Training are only suggested possible rewards, so the DM could certainly have the 'expertise' effect be the benefit of this form of training. If you meet the prerequisites and the DM allows it, you could also gain that effect by acquiring the Prodigy feat (though that seems like a very roundabout way to get there since the DM could simply grant Expertise as the training reward).
Expertise could also be a valid reward to get as a Blessing (DMG p.228) or in a custom magic item (make sure it requires attunement so the party can't just trade it around), but that's going a long way from the 'mechanic similar to training' you requested.