The chamber, based in the northeastern city of Barcelona, passed the secession resolution by 72 votes to 63.
The proposal was made by pro-secession lawmakers from the "Together for Yes" alliance and the extreme left-wing Popular Unity Candidacy (CUP). The groups together obtained a parliamentary majority in regional elections in September.
The Spanish government reacted swiftly.
In a nationally televised address, Rajoy said his government will appeal the decision at the Constitutional Court, which has in the past blocked moves toward independence.
"Catalonia is not going anywhere, nothing is going to break," Rajoy said.
He added he would meet with the leader of the main opposition Socialist Party, Pedro Sanchez, to forge a common front against the separatists.
The resolution passed by the parliament in its first post-election session declared "the start of a process toward the creation of an independent Catalan state in the form of a republic" and a "process of democratic disconnection not subject to the decisions by the institutions of the Spanish state."
While separatist lawmakers celebrated the result in the chamber, opponents held up Spanish and Catalan flags.
"There is a growing cry for Catalonia to not merely be a country, but to be a state with everything that means," Raul Romeva, head of the "Together for Yes" alliance, said at the start of the session. "Today we don't only open a new parliament, this marks a before and after."
Catalan branches of Spain's ruling conservative Popular Party and the Socialist and the Citizens opposition parties had filed appeals to halt the vote, but Spain's Constitutional Court ruled last Thursday that it could go ahead.
"You want to divide a country by raising a frontier within the European Union," Citizens regional leader Ines Arrimadas told separatist lawmakers. Read more: