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."

The International Tribunal for the Law of the Sea did, however, allow Ghana to continue developing current oilfields.
These include the so called-Ten fields, part owned by UK firm Tullow Oil.
Ivory Coast had asked that all drilling be suspended, but the tribunal ruled this would risk "considerable financial loss" to Ghana.
Instead, it told the West African nation to "take all necessary steps to ensure than no new drilling either by Ghana or under its control takes place in the disputed area" and to "refrain from granting any new permit for oil exploration and exploitation in the disputed area".
The area is believed to contain large reserves of oil, which both countries are keen to exploit.
Pending a ruling on the precise maritime border, the tribunal told both countries to "pursue co-operation and refrain from any unilateral action that might lead to aggravating the dispute".
The ruling was welcomed by Tullow Oil, which owns a large stake in the near $5bn (Â£3.3bn) Ten project, which could reportedly produce up to 80,000 barrels a day.
"Following this ruling, the Ten project can move ahead and we will now await instructions from the government of Ghana with regard to implementing those provisional measures that have been ordered by [the tribunal]," a Tullow spokesman said.

27 December 2016 Last updated at 09:00 GMT
German Shepherd Finn was injured early one October morning while protecting his handler from a suspected armed robber.
The seven-year-old fought for survival, helped every step of the way by his handler PC Dave Wardell.
BBC News looks back at how his recovery captured the hearts of thousands and inspired a petition calling on the government to re-think the laws surrounding injured police support animals.
Sam Robson and Paul Stirling scored centuries as reigning champions Middlesex dominated the opening day against Yorkshire at Lord's.
[NEXT_CONCEPT]
Ghana has been told by an international tribunal not to begin any new offshore drilling for oil in disputed waters with the Ivory Coast.
[NEXT_CONCEPT]
A police dog stabbed on duty returned to the beat earlier this month after life-saving surgery.