In our campaign last week, a huge golem used his action to Dash. He then dealt damage to us by running into our space. Was this possible to begin with?
There are two parts to this question: Movement through a character's space and being able to deliver an attack after it has used it's action AND movement to move. One other note is that golems range in size from Medium to Large. There are no Huge golems.
Yes, it is possible*
The asterisk provided is very much a big part of this answer, but please wait for it.
General movement rules are found on PHB, pp191.
You can move through a non-hostile creature's space. In contrast, you can only move through a hostile creature's space only if the creature is at least two sizes larger or smaller than you. Remember that another creature's space is difficult terrain for you.
Action economy is generally movement and an action. That action can be an attack or additional movement(the Dash action) as well as the other actions described in the PHB pp192.
RAW, there is no golem that has this capability
Monsters follow the same general rules as PCs in terms of Action Economy unless there is ability that gives them something else. Golems do not have any additional ability to enter a PC's space or to do damage outside of their standard action economy. In addition, their standard attack actions are typically Slams, Swords and some other special type of action dependent on the type of golem (MM, pp168-170). None of them have an 'trample' action or an attack with 'feet'.
If this monster was HUGE, then it could move through your space as if it was difficult terrain. That solves the "move through space" issue, but not the attack when there isn't an action available for attack.
However, other monsters do have abilities that allow movement through hostile spaces.
For instance, The Specter (MM, pp279) Can move through other creatures and objects. ALthough while it can move through a space, it isn't dealing damage while doing so.
*Rule Zero - DM's Prerogative
Finally, the caveat. Your DM may have given this ability to his monster for narrative and combat effect. This is entirely within their purview. It can be hard not to be upset to encounter something that doesn't seem 'fair' or isn't what you've read in the Monster Manual. That is a dangerous road to descend - try and enjoy your game and the world your DM has built.
Ultimately, it sounds like your DM either misunderstood the Attack vs Dash options for the Golem, or they gave it a new ability in it's stat block. Given that this was a Huge golem, it sounds like this was more likely a homebrew monster.
It depends on the creature's features
D&D 5e combat rules are very strict about dealing damage. If any creature, ability or effect deals damage, it must have explicit description of the mechanics.
For instance, the Shadow has the "Strength Drain" in its stats block:
Strength Drain. Melee Weapon Attack: +4 to hit, reach 5 ft., one creature.
Hit: 9 (2d6 + 2) necrotic damage, and the target's Strength score is reduced by 1d4.
The "9 (2d6 + 2) necrotic damage" is the amount and type of damage the feature deals.
Another example, that requires an attack roll:
Charge. If the boar moves at least 20 feet straight toward a target and then hits it with a tusk attack on the same turn, the target takes an extra 3 (1d6) slashing damage.
The golem you've mentioned could have a similar feature, that lets it deal damage by dashing.
Normally you can mitigate the damage
According to the rules, there are few factors (like fall or drowning), that always deals fixed amount of damage. Spells or features either require an attack roll, or can be mitigated (or even avoided) by a saving throw. The details always depend on the feature itself.
An example from the Fireball spell:
A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one.
DM has the last word
A creature's stats block is for DM, players are not supposed to see them. Your DM is free to change any stats or features, if they thinks it is necessary. The Golden Rule is "whatever the DM says, goes" - if they said the golem deals damage while moving, that means it happens, period. Next time your character will know that and will be able to adapt their tactics.
It will depend on the creature. If it was an Adamantine Golem it has a trample ability, but it would require it to also use slam on the same turn. If you can find the specific creature, it should have detail on how the particular attack was made.
Trample. If the golem moves at least 20 feet straight toward a creature and then hits it with a slam attack on the same turn, that target must succeed on a DC 26 Strength saving throw or be knocked prone. If the target is prone, the golem can make one slam attack as a bonus action.
Per the RAW, creatures do not have the ability to cause damage simply by moving.
In D&D 3.5 'Trample' was a full-round action that did the following:
As a full-round action, a creature with this special attack can move up to twice its speed and literally run over any opponents at least one size category smaller than itself. The creature merely has to move over the opponents in its path; any creature whose space is completely covered by the trampling creature’s space is subject to the trample attack.
-From the 3.5E SRD.
However, no such option exists in D&D 5E. The closest thing we see to this is the Trampling Charge feature that several creatures have (such as a Warhorse, Gorgon, or Elephant) that follows this template:
If the [creature] moves at least 20 feet straight toward a creature and then hits it with a [specific Attack Option] on the same turn, the target must succeed on a DC [XX] Strength saving throw or be knocked prone. If the target is prone, the [creature] can make another attack with its [Specific Attack Option] against it as a bonus action.
As you can see, there is no option here that allows it to just run over absolutely everything in its path. It must use its Move to move towards a target, its Action to attack it, then if the target is knocked prone (or is already prone), may attack again as a Bonus Action. This consumes all of the creature's actions for the round.
The ability to just plow through a crowd and deal damage to everything you pass is a violation of Action Economy in 5E. If your DM is allowing Large+ creatures to deal damage by moving, then your DM is houseruling that in, or referencing non-5E rules to manage that.
However, if your DM is using the 3.5E Style Trample rules...then you should be subjected to an Attack...not just automatic damage. So, the creature should make a melee Attack Roll opposed by your Armor Class.
If you're in homebrew territory, they may be calling for a DEX save instead. Either way...you should have some opportunity to avoid the damage (logically, by avoiding getting stepped on), and it should not simply be "And then you took damage."
By RAW, no for several reasons. By homebrew, yes but there should be a few restrictions.
Let's deal with the answer given by RAW first and foremost. There are two reasons this is not possible:
Golems being either medium or large, it is impossible for them to move through a hostile medium creature's space. If you were all halflings and gnomes and it was large, then it could have, but otherwise it's a no-go. However, since this was clearly a homebrewn golem, then sure.
Golems do not have the ability to trample characters simply by moving into their space, and even less so if it has already dashed.
The reason for these rules is as follows:
Trying to move through a creature's space logically requires you to either be able to push these creatures aside to have enough space, or to be of a size which allows you to either step over (larger) or around (smaller) them in a 5' by 5' square. For a creature of the same size, moving someone requires a Strength (Athletics) check.
Actually attacking and hitting a creature requires you to surmount their armor and their ability to dodge or parry an attack, represented by AC. Simply giving damage as you pass is only seen in certain circumstances as mentioned in some monsters' stat blocks. Saying that a creature has damaged someone means that the attack couldn't be avoided and bypassed any defenses that character has, which makes no sense.
However, as the DM makes the rules, if he says that something happens, then something happens. Some DMs, either through ignorance, incompetence or inexperience, have a tendency to abuse this power. I would recommend reminding your DM that, generally, homebrewn abilities, especially in combat, must be planned and considered ahead of time. A golem with such an ability has a higher CR than its normal counterparts (being able to deal unblockable damage while moving is insanely good).
For some hombrewing guidelines, here is what could have been considered:
Is this a higher CR monster? If yes, then that allows for several upgrades. Otherwise, a higher offensive capability could have been balanced by less health or a lower AC in order to maintain the CR.
Should there be an attack roll or saving throw possible? If the golem's feet are 5'x5', then a Dex ST could have been added to move out of the way. If not, the golem had to actually step on the characters with enough force to deal damage, which would require an attack roll.
Is this breaking the action economy? A golem making several attacks and moving with double speed certainly breaks the action economy, as it's getting a fair amount of movement and also hitting several PCs.
In your case, I imagine the DM thought that a huge golem sprinting through a space would step on its enemies and deal some damage with that step. However, regardless of the rules, this isn't a very feasible scenario. Imagine sprinting as fast as you can while simultaneously trying to hit several objects actively trying to avoid your steps, all within the span of a few seconds.