The House passed a budget bill that included wall funding.
https://www.npr.org/2018/12/20/678602214/senate-approves-tem...
It never reached the President's desk because the Senate failed to pass a compatible budget bill when Democrats refused to include any funding for a wall.
> Senate Democratic leader, Chuck Schumer, of New York, pledged to continue the discussions, but said it was clear there are not enough votes to pass a spending measure that includes funding for a wall along the nation’s southern border.
https://www.usatoday.com/story/news/politics/2018/12/21/gove...
The part you left out is that the Democrats blocked a bill with wall funding, even before they took over the House. Trump never "had a perfectly good budget on his desk, written by his allies and passed by Republicans".
Both parties put this issue ahead of the continued operation of the government and both are responsible for the shutdown.
Neither party has "had control" in the senate for years. It takes 60 votes in the senate to pass a budget, and neither party has had that.
The situation is far more complex than you're stating it.