Sporadically slow WiFi connection on MacBook
Turns out the cause of this was...the baby monitor! If the monitor is on and close to the MacBook, it apparently interferes with the wifi. If I simply move it far enough away, that seems to resolve the interference.