The pair shared a partnership of 187 after Nick Compton and Stevie Eskinazi fell in quick succession.
Stirling's century was his first in a Championship match and he made 111 before falling lbw to Adil Rashid.
Robson was dropped on 31 by Jack Brooks and was still there on 152 not out at the close, with Middlesex 337-4.
Yorkshire went into the game second in the Division One table, just six points behind leaders Essex, with Middlesex down in sixth place and minus Dawid Malan, Nick Gubbins and Tom Helm, who are all on international duty.
The home side, who won the title by beating Yorkshire in the corresponding match last season, opted to bat first after winning the toss and Compton put on 64 for the first wicket with Robson before a thin edge to the keeper off Steve Patterson saw him depart for 22.
Eskinazi was bowled by Brooks five overs later, but the Yorkshire paceman had crucially been unable to hold onto a low caught-and-bowled chance offered by Robson.
The opener was first to three figures following the tea interval, and although Stirling departed when he missed an attempted pull to a ball that kept slightly low and James Franklin was bowled by Ryan Sidebottom, he passed 150 with a boundary off Rashid - the 18th of his innings - in the final over of play.
Middlesex batsman Paul Stirling told BBC Radio London:
"It's about time I did this and also about time I started to score more consistently. That said, I don't want to take away my natural instinct to play attacking cricket. That's the balance I have to find.
"Our skipper James Franklin has given me freedom to go in and play at the same sort of tempo as I would in one-day cricket and transfer that into the red-ball game.
"When the pitches are as flat as they have been at Lord's it's a little easier to do that and I'm glad it came off."
Yorkshire head coach Martyn Moxon told BBC Radio Leeds:
"It's been a tough day, what with the weather and a pitch that's pretty benign. The lads stuck to their task really well.
"A few nicks fell short and some very close lbw decisions didn't go out way. It was a frustrating day, but I can't fault the lads for their efforts.
"We started this game trying to win it and we will pick up by making sure we don't lose it."
Sam Robson and Paul Stirling scored centuries as reigning champions Middlesex dominated the opening day against Yorkshire at Lord's.